mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
Handle wslg windows #45
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pigmej on GitHub (Oct 21, 2021).
Originally assigned to: @LGUG2Z on GitHub.
In recent WSL2 stuff, you can use WSLg to have UI support out of the box. Sadly these windows are currently completely not managed by komorebi (they stay on the screen regardless of the desktop and they float).
That's the window info from AHK Window Spy.
(it's similar to #52 )
@LGUG2Z commented on GitHub (Oct 21, 2021):
I don't have a build of windows that supports WSLg at the moment. Can you run the AHK script below and share the WindowStyle and WindowExStyle output for a WSLg app? This will help me narrow down why it is being excluded by the current window management logic.
https://www.computoredge.com/AutoHotkey/Downloads/CheckStyles.ahk
@pigmej commented on GitHub (Oct 21, 2021):
That would be that:

@LGUG2Z commented on GitHub (Oct 21, 2021):
Can you post the results from the WindowExStyle tab as well? I can already see that
WS_CAPTIONis not set on these windows, which is used by komorebi to decide to manage a window.Can you also check if other WSLg apps have the same ahk_class and ahk_exe?
@pigmej commented on GitHub (Oct 21, 2021):
Will do a bit later today. Like plus 30mins or so.
@LGUG2Z commented on GitHub (Oct 21, 2021):
I have just tried launching
geditthroughvcxsrvand I see the same behaviour.WS_CAPTIONandWS_EX_WINDOWEDGEare both not set on the window, which is what is causing them to not be managed. I believe that if we have a whilelist of exe files that are used for launching Linux GUI apps, we can override the caption and window edge requirements for managing windows by default.So far I can think of:
vcxsrv.exe- what I think a lot of people used before WSLg was a thingmstsc.exe- what is used by WSLgIf there are any other overwhelmingly common processes used for remotely displaying Linux GUI apps, they can be added to a default list too.
Ultimately, I think that the way forward is to allow each user to be able to configure via komorebic one or more processes that they use for remotely displaying Linux GUIs from WSL2, with a bunch of sane defaults (like for WSLg) built in.
@pigmej commented on GitHub (Oct 21, 2021):
They all have the same class. All the same, mostly title changes and that's It.
@LGUG2Z commented on GitHub (Oct 21, 2021):
Linux GUI apps run with VcXsrv, WSLg and X410 will now be tiled by default. 🎉
@pigmej commented on GitHub (Oct 22, 2021):
Works good! :)
@pigmej commented on GitHub (Oct 29, 2021):
@LGUG2Z same happens as in #52 currently.
@markgeejw commented on GitHub (Jul 16, 2022):
WSLg applications still seem to have issues. WSLg preview is now using msrdc.exe. I tried updating the array, but it still wasn't managing the WSLg window. Works with vcxsrv though!
When I manually manage the WSLg window, there seems to be issues with how komorebi tiles the window. The size of the window can only change by using the cursor to drag the edges. I think it has to do with how WSLg is handling window sizing server-side, according to microsoft/wslg#22