MetaBackendX11: Don't XResizeWindow behind clutter's back

In the case of a nested Wayland compositor inside an X session,
Clutter is managing the toplevel window size, so don't call
XResizeWindow on it - this will confuse Clutter and get the size
and the hints out of sync on the toplevel window.

https://bugzilla.gnome.org/show_bug.cgi?id=736279
This commit is contained in:
Owen W. Taylor 2014-09-08 14:14:33 -04:00
parent 7f15c995b7
commit 602dd7fdf2

View File

@ -631,10 +631,20 @@ static void
meta_backend_x11_update_screen_size (MetaBackend *backend,
int width, int height)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
Window xwin = meta_backend_x11_get_xwindow (x11);
XResizeWindow (priv->xdisplay, xwin, width, height);
if (meta_is_wayland_compositor ())
{
/* For a nested wayland session, we want to go through Clutter to update the
* toplevel window size, rather than doing it directly.
*/
META_BACKEND_CLASS (meta_backend_x11_parent_class)->update_screen_size (backend, width, height);
}
else
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
Window xwin = meta_backend_x11_get_xwindow (x11);
XResizeWindow (priv->xdisplay, xwin, width, height);
}
}
static void