Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clipped window, title bar buttons missing #2475

Closed
totaam opened this issue Nov 6, 2019 · 25 comments
Closed

clipped window, title bar buttons missing #2475

totaam opened this issue Nov 6, 2019 · 25 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 6, 2019

Issue migrated from trac ticket # 2475

component: client | priority: major | resolution: fixed

2019-11-06 11:35:06: wolfram created the issue


Windows client 3.0.2-24387 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:
[[Image(Xpra_3.0.2-r24387_missingIcons+clippedWindow.png)]]

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 11:35:42: wolfram uploaded file Xpra_3.0.2-r24387_missingIcons+clippedWindow.png (15.2 KiB)

Xpra_3.0.2-r24387_missingIcons+clippedWindow.png

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 14:36:39: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 14:36:39: antoine commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 14:58:51: antoine edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 14:58:51: antoine commented


(edit to show screenshot on ticket page)

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 15:36:26: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 16:10:57: antoine commented


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)

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 17:17:21: wolfram uploaded file Xpra_transparentXterm.png (57.2 KiB)

Xpra_transparentXterm.png

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2019

2019-11-06 17:20:07: wolfram commented


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-24387 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-24293 64-bit
2019-11-06 17:46:59,143  running on Linux RedHatEnterpriseWorkstation 7.4 Maipo

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 01:45:17: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 08:42:45: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 08:51:13: pfleckenstein commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 12:29:00: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 12:48:55: antoine changed title from Missing icon & action buttons, clipped window to clipped window

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 12:48:55: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 13:09:53: antoine commented


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!

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 15:13:14: antoine changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 15:13:14: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 15:13:14: antoine commented


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.

@totaam totaam closed this as completed Nov 7, 2019
@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 15:19:34: pfleckenstein commented


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...

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 15:22:43: pfleckenstein commented


Checked! Setting env var works!
Many thanks!

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 15:29:59: wolfram commented


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-24387 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...

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 16:38:41: antoine changed title from clipped window to clipped window, title bar buttons missing

@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2019

2019-11-07 16:38:41: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Nov 8, 2019

2019-11-08 08:58:05: pfleckenstein commented


Replying to [comment:16 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant