Windows 10 apparently has support for virtual desktops, we should detect changes and call suspend / resume.
There is also #2081's
As reported in ticket:2029#comment:25, Windows 10 Virtual Desktop Enhancer - Home must contain the API calls we need to hook into to be able to detect the current desktop / which desktop a window is on.
2020-04-07 12:12:02,569 screen size change: will reinit the windows
it would be nice if you made an effort to re-init the windows on the desktop they were originally
I've build a wrapper around Xpra to obtain this functionality.
For those who are interested: I use CreateDesktop? of User32.dll. More information on this topic: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createdesktopa
My workflow: 1) Call CreateDesktop? 2) Remove all open windows/hooks from the thread. In my case, I use Eto.Forms, so I just call Application.Dispose() to make sure all the handles are gone. 3) Call SetThreadDesktop? (Warning from the MS docs: The SetThreadDesktop? function will fail if the calling thread has any windows or hooks on its current desktop) This is only necessary if you want to create forms on the desktop. You can skip this step if you only want to launch Xpra. 4) Call SwitchDesktop? (wich makes the desktop visible) 5) Start Xpra.exe on the newly created virtual desktop, using the struct STARTUPINFO, property lpDesktop) 6) Wait for the Xpra proces to exit, then switch back to the original desktop.
Added a very simple example and the class exposing the used functions.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1442