Xpra: Ticket #1442: workspace support for MS windows 10

Split from #774, originally recorded in #776.

Windows 10 apparently has support for virtual desktops, we should detect changes and call suspend / resume.



Mon, 17 Jun 2019 16:10:49 GMT - Antoine Martin: status, milestone changed

Links:


Tue, 07 Apr 2020 10:05:04 GMT - stdedos:

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.


Additionally, when

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


Tue, 07 Apr 2020 10:05:25 GMT - stdedos: cc set


Tue, 07 Apr 2020 10:06:15 GMT - Antoine Martin: milestone changed; cc deleted


Tue, 07 Apr 2020 11:23:00 GMT - stdedos: cc set


Thu, 08 Oct 2020 05:03:24 GMT - Antoine Martin: milestone changed


Thu, 19 Nov 2020 10:00:37 GMT - Tijs van der Zwaan:

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.


Thu, 19 Nov 2020 10:07:27 GMT - Tijs van der Zwaan: attachment set


Thu, 19 Nov 2020 10:07:36 GMT - Tijs van der Zwaan: attachment set


Thu, 19 Nov 2020 10:08:24 GMT - Tijs van der Zwaan:

Added a very simple example and the class exposing the used functions.


Sat, 23 Jan 2021 05:24:25 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1442