mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
window-x11: Don't ever send ConfigureNotifies for OR windows
There's a race here. If an OR window hides itself, moves, and then shows itself, we will send a ConfigureNotify for the old size of the window and might receive it after the client moves itself, causing us to show the window at the wrong location. Simply not sending the ConfigureNotify is the easiest thing to do.
This commit is contained in:
parent
da311f266d
commit
e362227514
@ -204,6 +204,8 @@ send_configure_notify (MetaWindow *window)
|
|||||||
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
|
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
|
||||||
XEvent event;
|
XEvent event;
|
||||||
|
|
||||||
|
g_assert (!window->override_redirect);
|
||||||
|
|
||||||
/* from twm */
|
/* from twm */
|
||||||
|
|
||||||
event.type = ConfigureNotify;
|
event.type = ConfigureNotify;
|
||||||
@ -650,12 +652,6 @@ meta_window_x11_unmanage (MetaWindow *window)
|
|||||||
if (META_DISPLAY_HAS_SHAPE (window->display))
|
if (META_DISPLAY_HAS_SHAPE (window->display))
|
||||||
XShapeSelectInput (window->display->xdisplay, window->xwindow, NoEventMask);
|
XShapeSelectInput (window->display->xdisplay, window->xwindow, NoEventMask);
|
||||||
|
|
||||||
/* The XReparentWindow call in meta_window_destroy_frame() moves the
|
|
||||||
* window so we need to send a configure notify; see bug 399552. (We
|
|
||||||
* also do this just in case a window got unmaximized.)
|
|
||||||
*/
|
|
||||||
send_configure_notify (window);
|
|
||||||
|
|
||||||
meta_window_ungrab_keys (window);
|
meta_window_ungrab_keys (window);
|
||||||
meta_display_ungrab_window_buttons (window->display, window->xwindow);
|
meta_display_ungrab_window_buttons (window->display, window->xwindow);
|
||||||
meta_display_ungrab_focus_window_button (window->display, window);
|
meta_display_ungrab_focus_window_button (window->display, window);
|
||||||
@ -663,7 +659,15 @@ meta_window_x11_unmanage (MetaWindow *window)
|
|||||||
meta_error_trap_pop (window->display);
|
meta_error_trap_pop (window->display);
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
meta_window_destroy_frame (window);
|
{
|
||||||
|
/* The XReparentWindow call in meta_window_destroy_frame() moves the
|
||||||
|
* window so we need to send a configure notify; see bug 399552. (We
|
||||||
|
* also do this just in case a window got unmaximized.)
|
||||||
|
*/
|
||||||
|
send_configure_notify (window);
|
||||||
|
|
||||||
|
meta_window_destroy_frame (window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user