Xpra: Ticket #765: Google Chrome window does not run borderless

Using Xpra client version 0.4.12 on Slackware 14.0 (with Openbox), server version 0.12.3 on Ubuntu 14.04.

With Chrome running its default mode with a custom titlebar, it looks like chrome_openbox_window.png.

Both visible Maximize buttons work, and maximize the window; from there, Openbox recognizes that the window has been maximized, but Chrome itself does not, and still shows a "maximize" button, as in chrome_openbox_maximized.png. Once the window is maximized, the Maximize button now does nothing (visible).

Openbox's Minimize button minimizes the window as expected, but Chrome's does nothing when clicked.

Chrome's Close button closes windows correctly.

I'm very happy to run further tests and provide any other information that may be useful.

Mon, 22 Dec 2014 18:34:39 GMT - i336_: attachment set

Mon, 22 Dec 2014 18:35:06 GMT - i336_: attachment set

Tue, 23 Dec 2014 06:14:18 GMT - Antoine Martin: owner, status changed

I eventually found that chromium's x11_util.cc uses MotifWmHints to disable decorations.

So r8270 + r8271 adds suppport for the _MOTIF_WM_HINTS property, and we now pass the "decorations" flag to the client. We may even be able to remove some of the heuristics found in #766 / #762 now?

Not yet solved is the problem with minimize and maximize buttons not doing anything...

Tue, 23 Dec 2014 12:42:12 GMT - Antoine Martin:

As for minimizing and maximizing, here's the code that I found in chromium's desktop_window_tree_host_x11.cc:

void DesktopWindowTreeHostX11::Minimize() {
  XIconifyWindow(xdisplay_, xwindow_, 0);
void DesktopWindowTreeHostX11::Restore() {
  should_maximize_after_map_ = false;
  if (IsMinimized())

XIconifyWindow, we meet again (see also #726). In some cases, the clicks just aren't registered by chrome at all. Not sure why. Could be a separate issue.

When they are, the minimize buttons seems to trigger this event:

do_xpra_client_message_event(<X11:ClientMessage {'delivered_to': '0xa00001', 'send_event': 1, 'format': 32, \
    'data': (3, 1286, 24, 1714787328, 1439599504), 'window': '0xa00001', 'type': 33, 'serial': '0x21673', \
    'message_type': 'WM_CHANGE_STATE', 'display': ':10'}>)

Which we now handle correctly as of r8272 - which could be backported, but seeing how prone to breakage these changes are (#766).. I'm not sure.

And for the maximize button:

x_event_filter event=('xpra-client-message-event', None)/ClientMessage window=0xa00001
do_xpra_client_message_event(<X11:ClientMessage {'delivered_to': '0xa00001', 'send_event': 1, 'format': 32, \
    'data': (1, 246, 247, 1, 0), 'window': '0xa00001', 'type': 33, 'serial': '0x21e79', \
    'message_type': '_NET_WM_STATE', 'display': ':10'}>) window maximized=True

Even when we click it repeatedly, it seems that chrome doesn't see it as maximized yet, so it keeps asking us to make it maximized... Will fix.

Tue, 23 Dec 2014 15:10:56 GMT - Antoine Martin:

Maximize should be fixed in r8274 - should be backported (we weren't setting the correct window state, so chrome was thinking we weren't honouring the maximize and therefore never giving us the opportunity to unmaximize..)

But this is not the end of our problems: we also need to handle _NET_WM_MOVERESIZE (and whilst we're at it, maybe also _NET_MOVERESIZE_WINDOW)

Tue, 23 Dec 2014 16:23:29 GMT - Antoine Martin: attachment set

attempt at supporting _NET_WM_MOVERESIZE

Tue, 23 Dec 2014 16:36:02 GMT - Antoine Martin:

Added support for _NET_WM_MOVERESIZE in r8275 + r8276 - although this adds a new message type (initiate-moveresize) this could also be backported to v0.14.x with care (and after waiting + testing a bit more). This was more important now that we disabled window decorations for chrome because this also disabled client-side window manager resizing..


Wed, 24 Dec 2014 15:46:04 GMT - Antoine Martin: owner, status changed

Added support for _NET_MOVERESIZE_WINDOW in r8277 (includes a test app) - could also be backported.

i336_: does trunk work OK for you?

Thu, 25 Dec 2014 11:41:10 GMT - Antoine Martin:

Backported the iconification support (the easy part) in r8281.

The problem is that if I add the motif hints support (applications that don't want window decorations to be shown), then we also need the maximized changes and also probably the moveresize bits.. And it becomes a bit big for the stable branch - even though it seems more correct.

Fri, 26 Dec 2014 11:05:57 GMT - Antoine Martin:

r8292 makes us support changes to the "decorations" flag - should be backported. This can be tested with the "transparent colors" test app by clicking on the window, which toggles window decorations on and off.

See also #537 for maximize.

Sun, 28 Dec 2014 13:15:21 GMT - Antoine Martin:

Also needed: r8317 to advertise the capability to applications.

Tue, 30 Dec 2014 07:59:37 GMT - Antoine Martin:

As per #762 / #766: this needs to be backported sooner rather than later as there is no other way to "do the right thing" when it comes to window decorations.

Tue, 30 Dec 2014 11:36:58 GMT - Antoine Martin: owner, status changed

Almost everything (except the map / unmap code) was backported in r8336 + r8337 (+ minor fixes and tweaks in r8339, r8340, r8341 + r8342).

Remaining problems:

Tue, 30 Dec 2014 13:06:12 GMT - Antoine Martin: attachment set

adds button tracking so we can release buttons that were pressed to trigger the moveresize

Tue, 30 Dec 2014 13:07:36 GMT - Antoine Martin:

Scratch the "chrome still has a window grab": it does, but that's not a problem with xpra... took me a while to figure that one out! Happens with LXDE too. The patch above may be worth keeping, games and such may want to always get the matching events?

Tue, 30 Dec 2014 17:09:12 GMT - Antoine Martin:

Beta 0.14.16 and 0.15.0 packages with all these changes can be found here: http://xpra.org/beta/

i336_: any kind of testing feedback would be much appreciated.

Fri, 02 Jan 2015 10:43:38 GMT - Antoine Martin:

I am moving the win32 and osx support for _NET_WM_MOVERESIZE to #772 and closing this ticket.

Fri, 02 Jan 2015 10:43:51 GMT - Antoine Martin: status changed; resolution set

Wed, 21 Oct 2015 08:13:52 GMT - John1221:

I think Chrome windows should have 2 choices: border or borderless. I can resize Chrome windows if it run border.

Wed, 14 Sep 2016 16:24:10 GMT - Antoine Martin:

FYI: latest builds have move-resize support, see #772

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

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