Xpra: Ticket #2448: win32 builds need the gtk main loop early

This manifests itself as a slow system / hang: Xpra 3.0 Windows very slow ssh login.

That's because when we call the dialog subprocess, the main loop is not running yet - and something apparently needs it.

The patch attached fixes things, but forces us to run the gtk main loop then exit it, before running it again. It would be better to figure out what needs the main loop, and delay it.

Wed, 16 Oct 2019 13:17:49 GMT - totaamwin32: attachment set

possible fix

Wed, 16 Oct 2019 14:30:32 GMT - totaamwin32: owner, status changed

Turns out that simply calling from gi.repository import Gdk seems to have some serious side effects. Unfortunately, we can't easily delay that import as it is used everywhere.

So r24150 applies the patch above. Since we're now running a main loop, we could even get rid of the subprocess.

A cleaner solution would be to run the real main loop before calling setup_connection.

Wed, 16 Oct 2019 15:01:16 GMT - totaamwin32: attachment set

better solution - work in progress

Wed, 16 Oct 2019 15:03:08 GMT - totaamwin32:

The patch above is a better solution: we only setup the connection after the main loop has started.

To be merged, we will need to update all the other client classes (ie: WaitForDisconnectXpraClient, RequestStartClient etc) to do the same thing.

Fri, 18 Oct 2019 03:50:30 GMT - Antoine Martin: attachment set

updated patch

Fri, 18 Oct 2019 11:41:39 GMT - Antoine Martin:

Merged in r24171.

Still TODO: revert to running the dialog in-process, which will make it more reliable for handling non-ascii characters.

Mon, 21 Oct 2019 06:28:30 GMT - Antoine Martin: status changed; resolution set

SSH dialogs now run in-process: r24225.

See also #2549.

Sat, 23 Jan 2021 05:51:33 GMT - migration script:

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