xpra icon
Bug tracker and wiki

Opened 11 days ago

Closed 10 days ago

Last modified 10 days ago

#2475 closed defect (fixed)

clipped window, title bar buttons missing

Reported by: wolfram Owned by: Antoine Martin
Priority: major Milestone: 4.0
Component: client Version: 3.0.x
Keywords: Cc:

Description (last modified by Antoine Martin)

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:

Attachments (2)

Xpra_3.0.2-r24387_missingIcons+clippedWindow.png (15.2 KB) - added by wolfram 11 days ago.
Xpra_transparentXterm.png (57.2 KB) - added by wolfram 11 days ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 11 days ago by Antoine Martin

Status: newassigned

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?

Last edited 11 days ago by Antoine Martin (previous) (diff)

comment:2 Changed 11 days ago by Antoine Martin

Description: modified (diff)

(edit to show screenshot on ticket page)

comment:3 Changed 11 days ago by Antoine Martin

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

comment:4 Changed 11 days ago by Antoine Martin

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

  • win7 showing this dialog:
    2019-11-06 23:03:46,082 client   6 @33.298 process_new_common: wid=18, OR=False, geometry([553, 2250, 862, 385])=(553, 2250, 862, 385) / (862, 385)
    2019-11-06 23:03:46,082 client   6 @33.301 setup_window() position=(553, 2250), set_initial_position=True, OR=False, decorated=True
    2019-11-06 23:03:46,084 client   6 @33.302 setup_window() window frame sizes={'normal': (11, 11), 'fixed': (3, 3), 'minimum': (194, 55), 'menu-bar': 30, 'border': 1, 'caption': 33, 'offset': (11, 44), 'frame': (11, 11, 44, 11)}
    2019-11-06 23:03:46,091 client   6 @33.302 setup_window() adjusted initial position=(542, 2206)
    2019-11-06 23:03:46,094 client   6 @33.305 set_size_constraints({b'position': (0, 0), b'base-size': (0, 0), b'gravity': 1, b'minimum-size': (862, 385), b'maximum-size': (862, 385)}, (32767, 32767))
    2019-11-06 23:03:46,094 client   6 @33.306 intpair(b'maximum-size')=(862, 385)
    2019-11-06 23:03:46,094 client   6 @33.306 intpair(b'minimum-size')=(862, 385)
    2019-11-06 23:03:46,094 client   6 @33.306 intpair(b'base-size')=(0, 0)
    2019-11-06 23:03:46,094 client   6 @33.307 intpair(b'increment')=None
    2019-11-06 23:03:46,095 client   6 @33.307 modified hints for max window size (32767, 32767): {b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0} (rw=0, rh=0) -> max=862x385
    2019-11-06 23:03:46,095 client   6 @33.307 calling: <bound method GTK3ClientWindow.apply_geometry_hints of ClientWindow(18)>({b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0})
    2019-11-06 23:03:46,095 client   6 @33.308 apply_geometry_hints({b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0}) geometry=<Gdk.Geometry object at 0x00000000286acbd0 (void at 0x0000000024144aa0)>, hints=<flags GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_BASE_SIZE of type Gdk.WindowHints>
    2019-11-06 23:03:46,095 client   6 @33.311 apply_geometry_hints({b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0}) geometry=<Gdk.Geometry object at 0x00000000286a3d60 (void at 0x0000000024144aa0)>, hints=<flags GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_BASE_SIZE of type Gdk.WindowHints>
    2019-11-06 23:03:46,159 client   6 @33.336 ['configure-window', 18, 542, 2243, 810, 296, {'encodings.rgb_formats': ['BGRA', 'BGRX', 'RGBA', 'RGBX', 'BGR', 'RGB'], 'encoding.transparency': False, 'encoding.full_csc_modes': {'h264': ['ARGB', 'BGRA', 'BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'], 'vp8': ['YUV420P'], 'h265': ['BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'], 'mpeg4': ['YUV420P'], 'mpeg1': ['YUV420P'], 'mpeg2': ['YUV420P'], 'vp9': ['YUV420P', 'YUV444P'], 'webp': ['BGRA', 'BGRX', 'RGBA', 'RGBX']}, 'encoding.send-window-size': True, 'encoding.scrolling': True}, 0, {}, False, 18, (771, 2732), []]
    2019-11-06 23:03:46,160 client   6 @33.337 configure event: current size=(862, 385), new size=(810, 296), backing=gtk3.CairoBacking(<cairo.ImageSurface object at 0x00000000286ab990>), iconified=False
    2019-11-06 23:03:46,161 client   6 @33.339 map-window wid=18, geometry=(542, 2243, 810, 296), client props={'workspace': 65535}, state={'focused': True, 'frame': (11, 11, 44, 11)}
    2019-11-06 23:03:46,161 client   6 @33.340 ['configure-window', 18, 542, 2243, 810, 296, {}, 0, {}, False, 18, (771, 2732), []]
    2019-11-06 23:03:46,161 client   6 @33.340 configure event: current size=(810, 296), new size=(810, 296), backing=gtk3.CairoBacking(<cairo.ImageSurface object at 0x00000000286a5410>), iconified=False
    2019-11-06 23:03:46,161 client   6 @33.340 configure event: size unchanged, queueing redraw
    2019-11-06 23:03:46,161 client   6 @33.345 clip_to_backing(gtk3.CairoBacking(<cairo.ImageSurface object at 0x00000000286a5410>), <cairo.Context object at 0x00000000286a59d0>) rectangle=(0, 0, 810, 296)
    2019-11-06 23:03:46,162 client   6 @33.357 clip_to_backing(gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000002548d4b0>), <cairo.Context object at 0x00000000286a5f70>) rectangle=(0, 0, 1584, 1138)
    2019-11-06 23:03:46,162 client   6 @33.365 ['configure-window', 11, 302, 2199, 1584, 1138, {}, 0, {'focused': False}, True, 11, (770, 2732), []]
    
  • same dialog shown on Linux X11 (shown in full):
    2019-11-06 23:06:28,686 process_new_common: wid=24, OR=False, geometry([1669, 788, 862, 385])=(1669, 788, 862, 385) / (862, 385)
    2019-11-06 23:06:28,689 apply_geometry_hints({}) geometry=<Gdk.Geometry object at 0x7f3ea4f43d10 (void at 0x55ac3af668d0)>, hints=<flags 0 of type Gdk.WindowHints>
    2019-11-06 23:06:28,689 setup_window() position=(1669, 788), set_initial_position=True, OR=False, decorated=True
    2019-11-06 23:06:28,690 setup_window() window frame sizes={'frame': (0, 0, 37, 0), 'offset': (0, 37)}
    2019-11-06 23:06:28,690 setup_window() adjusted initial position=(1669, 751)
    2019-11-06 23:06:28,690 set_size_constraints({b'position': (0, 0), b'base-size': (0, 0), b'gravity': 1, b'minimum-size': (862, 385), b'maximum-size': (862, 385)}, (32767, 32767))
    2019-11-06 23:06:28,691 intpair(b'maximum-size')=(862, 385)
    2019-11-06 23:06:28,691 intpair(b'minimum-size')=(862, 385)
    2019-11-06 23:06:28,691 intpair(b'base-size')=(0, 0)
    2019-11-06 23:06:28,691 intpair(b'increment')=None
    2019-11-06 23:06:28,691 modified hints for max window size (32767, 32767): {b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0} (rw=0, rh=0) -> max=862x385
    2019-11-06 23:06:28,691 calling: <bound method GTK3ClientWindow.apply_geometry_hints of GLClientWindow(24 : GLDrawingArea(24, (862, 385), None))>({b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0})
    2019-11-06 23:06:28,692 apply_geometry_hints({b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0}) geometry=<Gdk.Geometry object at 0x7f3ea4f43e90 (void at 0x55ac3b6db5a0)>, hints=<flags GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_BASE_SIZE of type Gdk.WindowHints>
    2019-11-06 23:06:28,693 apply_geometry_hints({b'max_width': 862, b'max_height': 385, b'min_width': 862, b'min_height': 385, b'base_width': 0, b'base_height': 0}) geometry=<Gdk.Geometry object at 0x7f3ea4f43e30 (void at 0x55ac3b6db5a0)>, hints=<flags GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_BASE_SIZE of type Gdk.WindowHints>
    2019-11-06 23:06:28,724 ['configure-window', 24, 1669, 788, 862, 385, {'encodings.rgb_formats': ['YUV420P', 'YUV422P', 'YUV444P', 'GBRP', 'BGRA', 'BGRX', 'RGBA', 'RGBX', 'RGB', 'BGR'], 'encoding.transparency': False, 'encoding.full_csc_modes': {'h264': ['ARGB', 'BGRA', 'BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'], 'vp8': ['YUV420P'], 'h265': ['BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'], 'mpeg4': ['YUV420P'], 'mpeg1': ['YUV420P'], 'mpeg2': ['YUV420P'], 'vp9': ['YUV420P', 'YUV444P'], 'webp': ['BGRA', 'BGRX', 'RGBA', 'RGBX']}, 'encoding.send-window-size': True, 'encoding.scrolling': True, 'encoding.bit-depth': 24}, 0, {'focused': False}, False, 24, (1915, 1348), ['mod2']]
    2019-11-06 23:06:28,725 configure event: current size=(862, 385), new size=(862, 385), backing=GLDrawingArea(24, (862, 385), None), iconified=False
    2019-11-06 23:06:28,725 configure event: size unchanged, queueing redraw
    2019-11-06 23:06:28,727 ['configure-window', 24, 1669, 788, 862, 385, {}, 0, {}, False, 24, (1915, 1348), ['mod2']]
    2019-11-06 23:06:28,727 configure event: current size=(862, 385), new size=(862, 385), backing=GLDrawingArea(24, (862, 385), None), iconified=False
    2019-11-06 23:06:28,727 configure event: size unchanged, queueing redraw
    2019-11-06 23:06:28,736 ['configure-window', 24, 1669, 788, 862, 385, {}, 0, {}, False, 24, (1915, 1348), ['mod2']]
    2019-11-06 23:06:28,736 configure event: current size=(862, 385), new size=(862, 385), backing=GLDrawingArea(24, (862, 385), None), iconified=False
    2019-11-06 23:06:28,736 configure event: size unchanged, queueing redraw
    2019-11-06 23:06:28,756 map-window wid=24, geometry=(1669, 788, 862, 385), client props={'workspace': 65535}, state={'focused': True, 'frame': (0, 0, 37, 0)}
    2019-11-06 23:06:28,764 clip_to_backing(GLDrawingArea(24, (862, 385), None), <cairo.Context object at 0x7f3ead5cf570>) rectangle=(0, 0, 862, 385)
    2019-11-06 23:06:28,767 clip_to_backing(GLDrawingArea(24, (862, 385), None), <cairo.Context object at 0x7f3ead5cf1d0>) rectangle=(0, 0, 862, 385)
    2019-11-06 23:06:28,776 clip_to_backing(GLDrawingArea(11, (1584, 1138), None), <cairo.Context object at 0x7f3ead5cf4b0>) rectangle=(0, 0, 1584, 1138)
    2019-11-06 23:06:28,788 clip_to_backing(GLDrawingArea(11, (1584, 1138), None), <cairo.Context object at 0x7f3ead5c5510>) rectangle=(0, 0, 1584, 1138)
    2019-11-06 23:06:28,819 ['configure-window', 11, 1429, 818, 1584, 1138, {}, 0, {'focused': False}, True, 11, (1915, 1348), ['mod2']]
    

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)

Changed 11 days ago by wolfram

Attachment: Xpra_transparentXterm.png added

comment:5 Changed 11 days ago by 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

comment:6 Changed 11 days ago by 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.

Last edited 10 days ago by Antoine Martin (previous) (diff)

comment:7 Changed 11 days ago by 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.

comment:8 Changed 11 days ago by 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?

Last edited 11 days ago by Patrick Fleckenstein (previous) (diff)

comment:9 Changed 10 days ago by 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.

comment:10 Changed 10 days ago by Antoine Martin

Summary: Missing icon & action buttons, clipped windowclipped window

(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)

comment:11 Changed 10 days ago by 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!

comment:12 Changed 10 days ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

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.

Last edited 10 days ago by Antoine Martin (previous) (diff)

comment:13 in reply to:  9 Changed 10 days ago by 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...

Last edited 10 days ago by Antoine Martin (previous) (diff)

comment:14 in reply to:  12 Changed 10 days ago by Patrick Fleckenstein

Checked! Setting env var works!
Many thanks!

Last edited 10 days ago by Antoine Martin (previous) (diff)

comment:15 Changed 10 days ago by 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...

comment:16 Changed 10 days ago by Antoine Martin

Summary: clipped windowclipped window, title bar buttons missing

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.

Last edited 10 days ago by Antoine Martin (previous) (diff)

comment:17 in reply to:  16 Changed 10 days ago by 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!

Note: See TracTickets for help on using tickets.