RamonUnch / AltSnap

Maintained continuation of Stefan Sundin's AltDrag
GNU General Public License v3.0
2.15k stars 71 forks source link

Bug: WSLg not support #191

Open neo-sam opened 2 years ago

neo-sam commented 2 years ago

https://user-images.githubusercontent.com/13063376/170675619-587155db-6226-4009-8a7f-16e765becace.mp4

Could you fix it? If not, maybe add exclude item mstsc.exe in:

https://github.com/RamonUnch/AltSnap/blob/077a09e58acd03d1cf6f3b6b9c0a54c02c38a135/AltSnap.ini#L243

RamonUnch commented 2 years ago

Yes mstsc.exe can be added to the blacklist, it would be useful for remote desktop connection, but it should not change anything on WSLg. By default the *|TSSHELLWND should be in the Windows blacklist for the same purpose (mstsc.exe main window).

I have no idea on how to move Windows inside WSLg. Probably you would need to write a program inside Linux environment or install an other window manager under your Linux Install. I never setup a WSL environment And I no more have a Win10 computer and it runs slow as hell on any VM so I guess I will check this out when I get more time and a more modern PC.

Also do you get any details when using the identify window option in the blacklist tab on the config dialog?

neo-sam commented 2 years ago

AutoHotKey, Windows Spy:

glxgears (arch)
ahk_class RAIL_WINDOW
ahk_exe mstsc.exe
ahk_pid 8504

Process Commandline:

mstsc.exe /v:65D378AF-40D6-4FFB-88B9-7C157DD1161E /hvsocketserviceid:C02CFA8B-FACB-11E6-BD58-64006A7986D3 /silent /wslg /plugin:WSLDVC /wslgsharedmemorypath:WSL\65D378AF-40D6-4FFB-88B9-7C157DD1161E\wslg C:\ProgramData\Microsoft\WSL\wslg.rdp

Seems no other useful identification ...

RamonUnch commented 2 years ago

So it would seem that the Linux programs are embedded inside a mstsc.exe window, so in this case we need to be sure that mstsc windows are not in the blacklist. Try just in case to remove the *|TSSHELLWND item in the Windows blacklist if it is present. Also I would like if possible to see AltSnap own Identify Window that will tell us if AltSnap gets the same info than the ahk script.

neo-sam commented 2 years ago

After tweak blacklist:

0

One More Thing: Although the frontend visual window stuck, glxgears still log stable and normal render fps in the terminal background!

RamonUnch commented 2 years ago

Strange to see that it does not work, all seems to indicate that the window should be moveable. I really need to get Windows 11 at some point to make this kind of tests. Maybe just in case, try to elevae AltSnap if it is not already the case. you can quickly try from the tray menu.

RamonUnch commented 2 years ago

Also seems to be related to https://github.com/microsoft/wslg/issues/574 So I guess older versions of AltSnap were working better. I am unsure however.

sukerokushin commented 2 years ago

still persists in the exact same way on wslg 1.0.41 and altsnap 1.54. the programs also stopped updating visually but were still working in the background, exactly as OP said. i tried elevating as well and nothing changed.

RamonUnch commented 2 years ago

Well for now I have no access to Windows 11 and I cannot test WSLg. At this moment you must add mstsc.exe to the process balcklist or add *|RAIL_WINDOW to the Windows blacklist.