window: Make sure to update client_rect for OR windows too

Before we unmanage, we send a ConfigureNotify to clients to let them
know if their frame is destroyed. We do this for OR windows too, even if
we really probably shouldn't.

This is based off of the client_rect. Since we listen to ConfigureNotify
on OR windows, we'll receive the event. If we don't ever update the
client_rect when moving or resizing OR windows, then we'll send
ourselves a ConfigureNotify for a 0x0 size and then think that the
client chose a new size for itself. Since our get_paint_volume is based
on that rectangle, but the TFP code inside Cogl uses XGetGeometry
itself, we get weird flickering artifacts.
This commit is contained in:
Jasper St. Pierre 2014-06-03 11:21:22 -04:00
parent f5a4e996a8
commit da311f266d

View File

@ -534,11 +534,22 @@ meta_window_x11_manage (MetaWindow *window)
} }
} }
/* Put our state back where it should be, /* For override-redirect windows, save the client rect
* passing TRUE for is_configure_request, ICCCM says * directly. window->rect was assigned from the XWindowAttributes
* initial map is handled same as configure request * in the main meta_window_shared_new.
*
* For normal windows, do a full ConfigureRequest based on the
* window hints, as that's what the ICCCM says to do.
*/ */
if (!window->override_redirect)
if (window->override_redirect)
{
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
priv->client_rect = window->rect;
}
else
{ {
MetaRectangle rect; MetaRectangle rect;
MetaMoveResizeFlags flags; MetaMoveResizeFlags flags;
@ -3212,6 +3223,9 @@ void
meta_window_x11_configure_notify (MetaWindow *window, meta_window_x11_configure_notify (MetaWindow *window,
XConfigureEvent *event) XConfigureEvent *event)
{ {
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
g_assert (window->override_redirect); g_assert (window->override_redirect);
g_assert (window->frame == NULL); g_assert (window->frame == NULL);
@ -3219,6 +3233,9 @@ meta_window_x11_configure_notify (MetaWindow *window,
window->rect.y = event->y; window->rect.y = event->y;
window->rect.width = event->width; window->rect.width = event->width;
window->rect.height = event->height; window->rect.height = event->height;
priv->client_rect = window->rect;
meta_window_update_monitor (window); meta_window_update_monitor (window);
/* Whether an override-redirect window is considered fullscreen depends /* Whether an override-redirect window is considered fullscreen depends