Does not work with WSL2/msrdc windows
PlasmaHH opened this issue · 9 comments
Windows displayed within WSL2 are really done by msrdc.exe and there no window can be dragged in any way
I do not have Win11 nor any hardware potent enough to even try it, let along on a VM, so I can do no testing for now.
Not sure if its 100% duplicate as this is under win10 and with msrdc.exe instead of mstsc.exe...
Not sure if its 100% duplicate as this is under win10 and with msrdc.exe instead of mstsc.exe...
Quite true, I did not experience problems with mstsc alone, do you have problems with msrdc outside of WSL2 usage?
I believe it is related to the subsystem itself and not the remote desktop system because mstsc is well designed and was debugged for more than 25 years. and even if msrdc is much less mature, the fact that two different remote desktop programs give the same result is an additional indication that the problem comes from WSL itself. I might be wrong of course and I think msrdc is based on the same kernel than mstsc so the difference is probably less than we might think.
I never used msrdc for anything else so can't tell ( I am mostly a linux person being forced to use windows and missing the alt drag feature a lot with wsl2 because it mistplaces my windows in a way I cannot grab the titlebar ).
Maybe this is of any help: I first discovered altdrag and tried it, and it would drag the window, but in a way only the visual of it, all the areas where you would click were now invisibly "hovering" at the place where the window had been originally... I don't know much about it, but it feels for me like msrdc is doing things somehow on a "lower level" to catch and forward mouse clicks to the real application than a normal window would do...
If you have anything that I could test to see what might be going on....
The dragging of WSLg windows was blacklisted via *|RAIL_WINDOW
, so that AltSnap does not break the WSLg windows, I do not know if the same blacklist item applies to WSL2/msrdc but to make an actual test, make sure you removed it from the blacklist.
With WSLg the window would freeze.
Also you could try to connect to another Windows PC using mstsc and msrdc and check if you can move their main window using AltSnap. mstsc is blacklisted by default by the *|TSSHELLWND
item, so that you can move windows from the host to which you are conneced if AltSanp is running on the host. I do not know for msrdc
I think it is related to microsoft/wslg#22
See also: https://devblogs.microsoft.com/commandline/wslg-architecture/
I remember a while back I used a simple X11 server on Windows NT or 2000 or maybe Win98SE, (I do not remember very well) it was named VcXsrv, It is still usable I guess and it is far more mature that WSLg I am sure it can be setup with WSL2. I am 99% sure it should work with AltSnap, because I do no think it uses server side move/resize (WSLg seems to require resizing on the server side which cannot be possibly done by AltSnap), see the above wslg-architecture link.