Xpra: Ticket #2475: clipped window, title bar buttons missing

Windows client 3.0.2-r24387 is still not usable for me. The Icon in the top left corner and action buttons in the top right corner are still missing (see attachment). Some windows are clipped at the bottom so that buttons like "Launch"/"Cancel" are not accessible. Some windows start "dancing" off the screen to the bottom after being moved. All of the above problems happen for me in the "Select ... workspace" window of Eclipse shown in the attachment:



Wed, 06 Nov 2019 11:35:42 GMT - wolfram: attachment set


Wed, 06 Nov 2019 14:36:39 GMT - Antoine Martin: status changed

What is your server OS and version? Which version of eclipse? Can you post the client's -d geometry debug output?

This may be similar to #2457, does using the python2 client fix things?


Wed, 06 Nov 2019 14:58:50 GMT - Antoine Martin: description changed

(edit to show screenshot on ticket page)


Wed, 06 Nov 2019 15:36:25 GMT - Antoine Martin:

FWIW: the latest eclipse works fine for me with a Fedora 31 server. You must be running some other distro..


Wed, 06 Nov 2019 16:10:56 GMT - Antoine Martin:

Got it, but only on a different win7 client system:

And so it is similar to #2457: we request a fixed size window of size 862x385 and GTK3 on win32 gives us a window of size 810x296. Maybe we need to resize the widget instead of the window, and let the window size to its contents? (GTK3 is really making it difficult to do simple things)


Wed, 06 Nov 2019 17:17:21 GMT - wolfram: attachment set


Wed, 06 Nov 2019 17:20:07 GMT - wolfram:

I was now starting the client from an Xpra[...].zip that I just unpacked in some directory so that I don't need to up- and downgrade my client all the time. Funny thing is that now most windows (e.g. xterm, nedit) show up as just titlebar and transparent frame (see attachment) when I use a Xpra-Python3 version. Xpra-Python2 is ok.

Startup messages:

2019-11-06 17:46:50,482 Xpra GTK3 client version 4.0-r24387 64-bit
2019-11-06 17:46:50,484  running on Microsoft Windows 10
2019-11-06 17:46:50,542 Warning: failed to import opencv:
2019-11-06 17:46:50,543  No module named 'cv2'
2019-11-06 17:46:50,543  webcam forwarding is disabled
2019-11-06 17:46:50,811 OpenGL_accelerate module loaded
2019-11-06 17:46:50,847 Using accelerated ArrayDatatype
2019-11-06 17:46:52,035 OpenGL enabled with NVS 310/PCIe/SSE2
2019-11-06 17:46:52,377 Connected (version 2.0, client OpenSSH_7.4)
2019-11-06 17:46:52,431 SSH password authentication failed:
2019-11-06 17:46:52,431  Bad authentication type; allowed types: ['publickey', 'gssapi-keyex', 'gssapi-with-mic', 'password']
please enter the SSH password for <...>:
2019-11-06 17:46:57,711 Authentication (password) successful!
2019-11-06 17:46:57,825  keyboard settings: layout=de
2019-11-06 17:46:57,827  desktop size is 3120x1600 with 1 screen:
2019-11-06 17:46:57,827   Default (825x423 mm - DPI: 96x96) workarea: 3120x1560
2019-11-06 17:46:57,828     (Standard monitor types) HP ZR2440w 1920x1200 at 1200x274 (518x324 mm - DPI: 94x94) workarea: 1920x1160
2019-11-06 17:46:57,828     (Standard monitor types) hp L2035 1200x1600 (408x306 mm - DPI: 74x132) workarea: 1200x1560
2019-11-06 17:46:59,141 enabled remote logging
2019-11-06 17:46:59,143 Xpra GTK2 X11 server version 3.0.1-r24293 64-bit
2019-11-06 17:46:59,143  running on Linux RedHatEnterpriseWorkstation 7.4 Maipo

Thu, 07 Nov 2019 01:45:16 GMT - Antoine Martin:

Funny thing is that now most windows (e.g. xterm, nedit) show up as just titlebar and transparent frame

That's #2466 and is already fixed, but because you're running from the ZIP file, the default config file used does not match and still has opengl enabled. You can turn opengl off by hand from the command line or the system tray menu to get the window contents back.


Thu, 07 Nov 2019 08:42:44 GMT - Antoine Martin:

OK, so this is exactly the same problem as #2457 and once again GTK3 is not honouring what we request on some win32 systems (but not all! works ok on my main test system..) and also on wayland.

Gtk.Window.resize : When using client side decorations, GTK+ will do its best to adjust the given size so that the resulting window size matches the requested size without the title bar, borders and shadows added for the client side decorations, but there is no guarantee that the result will be totally accurate because these widgets added for client side decorations depend on the theme and may not be realized or visible at the time Gtk.Window.resize() is issued.

Once again, it is GTK3 / CSD creating these problems (this works absolutely fine in GTK2): GTK3 CSD on gtk_window_resize() also counts client side decorations size.


Thu, 07 Nov 2019 08:51:13 GMT - Patrick Fleckenstein:

I can confirm with Python 2 Setup this bug of hopping/dancing windows doesn't appear. But instead other things seems to be broken. I also tested with latest XPRA 4 beta but GTK bug already exist.

Are you planing XPRA 4 with Python/GTK4?


Thu, 07 Nov 2019 12:28:59 GMT - Antoine Martin:

But instead other things seems to be broken.

What are those? The GTK2 builds are meant to be bug-free.

Are you planing XPRA 4 with Python/GTK4?

We are unlikely to ever support GTK4. GTK3 is hard to support, GTK4 is worse and drops some key functions. If anything, I'm hoping we can just remove GTK entirely from the win32 builds.


Thu, 07 Nov 2019 12:48:54 GMT - Antoine Martin: summary changed

(I'm editing the ticket summary: the action buttons are not missing, that's the way this window is configured whether you run it through xpra or not)


Thu, 07 Nov 2019 13:09:53 GMT - Antoine Martin:

Upstream ticket: GtkWindow CSD: gtk_window_resize() also includes client side decorations size shows a lot of breakage, and I'm still not clear on how we're supposed to be able to request the precise window size we want!


Thu, 07 Nov 2019 15:13:13 GMT - Antoine Martin: status changed; resolution set

I was close to giving up when I tried the undocumented GTK_CSD=0 and voila, this fixes this horrendous GTK3 bug. So r24403 sets this environment variable early for all subcommands. Hopefully, client applications won't mind. Otherwise, we will need to be more selective about where + when to apply it..

As a bonus, this seems to also fix win32 opengl rendering #2466!

Note: with wayland via weston, the GTK3 bug remains... because CSD can't be disabled there. The GTK developers refuse to merge this trivial patch (which would solve ALL problems): gtkwindow-Don-t-force-enable-CSD-under-Windows.patch More info here: Disable client side decorations (GTK_CSD) by default on Windows (win32)

The patch was wrongly dropped from MSYS2: gtk3: Update to 3.24.12.


Thu, 07 Nov 2019 15:19:33 GMT - Patrick Fleckenstein:

But instead other things seems to be broken.

What are those?

I start server with

xpra start --start-new-commands=yes

and then attach windows client with

xpra attach ssh:myserver --ssh"plink -l myusername" --start=/path/to/my/program

After opening some sub-windows in my program connection crashes and this errors appear in server log:

@19.864 Error creating pixmap backing of size 32766x32766
@19.872  could not create GdkPixmap object

Maybe this is in relation to a big size client display (2752x1856)? But with Python3/GTK3 this error doesn't appear...


Thu, 07 Nov 2019 15:22:43 GMT - Patrick Fleckenstein:

Checked! Setting env var works! Many thanks!


Thu, 07 Nov 2019 15:29:58 GMT - wolfram:

Could you explain "the action buttons are not missing, that's the way this window is configured", please? What I get in the Eclipse Launcher window when I run Xpra-Python2-x86_64_3.0.2-r24387 is an Eclipse icon/button in the top left corner and in the top right corner a "-" (for minimize), a square for maximize (greyed out because maximize is not supported) and an "x" for close. That's very different form the screenshot at the top of this ticket...


Thu, 07 Nov 2019 16:38:41 GMT - Antoine Martin: summary changed

xpra start --start-new-commands=yes

start-new-commands=yes is the default since v3.

After opening some sub-windows in my program connection crashes and this errors appear in server log:

Which application can I use to reproduce this problem?

Error creating pixmap backing of size 32766x32766

Looks like an invalid signed value is used where a 16-bit unsigned value is expected. The GTK2 pixmap backend must be failing to allocate enough memory for the window, other backends may well fare better. Can you please create a separate ticket for this?

Maybe this is in relation to a big size client display (2752x1856)?

No. Xpra is regularly tested with 4k client displays. Xpra has also been tested with client displays exceeding 16384x16384! (though this does require manual tweaks to the server config to achieve)

Could you explain "the action buttons are not missing, that's the way this window is configured", please?

I was wrong and I have re-instated this in the summary. Note that how each client operating system decides to draw the window buttons may vary... especially when dealing with a fixed size window.


Fri, 08 Nov 2019 08:58:04 GMT - Patrick Fleckenstein:

Replying to Antoine Martin:

After opening some sub-windows in my program connection crashes and this errors appear in server log:

Which application can I use to reproduce this problem?

I'm afraid this is difficult because it is a special licensed ERP software. But with your fix setting the GTK_CSD value it works fine again with GTK3. So no more problems here!


Sat, 23 Jan 2021 05:52:18 GMT - migration script:

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