Xpra: Ticket #2462: up resuming, client window not on the focused workspace is black.

This bug is apparently introduced when fixing ticket #2436 (r24062).

I have four virtual workspaces on my ubuntu client (18.04 64 bit). The xpra server serves two windows to the client, a firefox window, which I put on workspace 1 on the client, and a chrome window, which I put on workspace 4. I start the xpra on the client from a terminal window located on workspace 4. So when it starts up, I am on workspace 4, and chrome shows up fine. When I go to workspace 1, the firefox window is black. I can return it by typing ctrl-L to focus on the address bar (which I cannot see, and type in any address and load a webpage. Then the whole window will reappaear.

The bug seems to lie on the client xpra, because it doesn't matter which version the server run.

In face, all I need to do to "fix" it is to copy the version of the file

/usr/lib/python3/dist-packages/xpra/client/client_window_base.py

before fix r24062, and the client window appears fine. But of course, that may be only because all the client windows appear on workspace 4, regardless where it originally was, which is exactly what r24062 tried to fix.



Thu, 24 Oct 2019 03:55:44 GMT - Antoine Martin: priority, status, description changed

I can reproduce a problem: starting with two xterms, one on each workspace, and then connecting from a command line running on workspace 2. The xterm on workspace 2 shows up black.


Thu, 24 Oct 2019 15:10:29 GMT - Antoine Martin:

Interesting, happens with both python2 / gtk2 builds and python3 / gtk3 clients. But only with python3 servers. Launching the client with XPRA_SET_WORKSPACE=0 "fixes" the problem in the same way as reverting r24062: disabling workspace support.

-d workspace log:

During startup, the server prints workspace probing twice:

2019-10-24 22:05:09,841 _NET_WM_DESKTOP=0 for window 0x600022
2019-10-24 22:05:10,227 _NET_WM_DESKTOP=UNSET for window 0xa00022

Are we scrubbing it?


Sat, 26 Oct 2019 11:12:44 GMT - Antoine Martin:

Logging at the packet level with:

XPRA_LOG_PACKETS="*,-logging,-server-settings,-set-keyboard-sync-enabled,-damage-sequence,-ping,-ping_echo,-clipboard-token,-info-request,-sound-control,-sound-data,-info-response,-cursor,-set_deflate,-window-icon,-info-response"

With python3 server:

2019-10-25 19:56:00,257 ['new-window', 1, 137, 260, 499, 316, {b'xid': b'0x600022', b'client-machine': b'localhost.localdomain', b'pid': 10816, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'window-type': (b'NORMAL',), b'workspace': 0, b'size-constraints': {b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1, b'minimum-size': (25, 17)}, b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src'}, {b'screen': 0}]
2019-10-25 19:56:00,258 ['new-window', 2, 0, 64, 499, 316, {b'xid': b'0xa00022', b'client-machine': b'localhost.localdomain', b'pid': 11502, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'window-type': (b'NORMAL',), b'workspace': 1, b'size-constraints': {b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1, b'minimum-size': (25, 17)}, b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src'}, {b'screen': 0}]
2019-10-25 19:56:00,258 ['startup-complete']

With python2:

2019-10-25 19:57:19,806 ['new-window', 1, 0, 64, 499, 316, {b'size-constraints': {b'minimum-size': (25, 17), b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1}, b'window-type': (b'NORMAL',), b'xid': b'0x600022', b'workspace': 0, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'client-machine': b'localhost.localdomain', b'pid': 10816}, {}]
2019-10-25 19:57:19,806 ['new-window', 2, 45, 109, 499, 316, {b'size-constraints': {b'minimum-size': (25, 17), b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1}, b'window-type': (b'NORMAL',), b'xid': b'0xa00022', b'workspace': 1, b'title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'icon-title': b'antoine@localhost:~/projects/Xpra/trunk/src', b'class-instance': (b'xterm', b'XTerm'), b'client-machine': b'localhost.localdomain', b'pid': 11502}, {}]
2019-10-25 19:57:19,806 ['startup-complete']

Showed that the python3 server is sending the screen attribute back to the client, which is causing the problem. r24265 fixes this.

What's strange is that the GTK3 clients no longer honour the "screen" setting, which was deprecated in GTK, yet they still fail.. so this must be triggering another bug.


Sat, 26 Oct 2019 15:49:46 GMT - Antoine Martin: status changed; resolution set

The real fix is in r24277. The workspace and screen stuff just made it easier to hit: the handling of this extra metadata made us try to refresh the windows quickly after they're shown and a bug in the av-sync timer caused the screen update to get lost.


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

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