mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
window: Don't try to map / unmap OR windows by ourselves
This is bad behavior, and can also cause us to get in an infinite loop if an OR window is mapped and unmapped in quick succession. This sequence causes a MapNotify followed by an UnmapNotify, and when processing the events, we'll call XMapWindow, XUnmapWindow, which will put another set of MapNotify, UnmapNotify events in our queue, which we then process by calling XMapWindow, XUnmapWindow, and so it goes forever, or at least some scheduler uncorks us by making us call XMapWindow when the window is already mapped, or XUnmapWindow when the window is already unmapped. We can stop this madness by simply making sure never to call neither XMapWindow or XUnmapWindow on OR windows, which is the correct thing to do anyway.
This commit is contained in:
parent
711f0c0c50
commit
34979c3fe8
@ -727,6 +727,8 @@ sync_client_window_mapped (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
gboolean should_be_mapped = client_window_should_be_mapped (window);
|
gboolean should_be_mapped = client_window_should_be_mapped (window);
|
||||||
|
|
||||||
|
g_return_if_fail (!window->override_redirect);
|
||||||
|
|
||||||
if (window->mapped == should_be_mapped)
|
if (window->mapped == should_be_mapped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1155,7 +1157,8 @@ _meta_window_shared_new (MetaDisplay *display,
|
|||||||
/* disable show desktop mode unless we're a desktop component */
|
/* disable show desktop mode unless we're a desktop component */
|
||||||
maybe_leave_show_desktop_mode (window);
|
maybe_leave_show_desktop_mode (window);
|
||||||
|
|
||||||
sync_client_window_mapped (window);
|
if (!window->override_redirect)
|
||||||
|
sync_client_window_mapped (window);
|
||||||
|
|
||||||
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
|
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
|
||||||
/* See bug 303284; a transient of the given window can already exist, in which
|
/* See bug 303284; a transient of the given window can already exist, in which
|
||||||
@ -1520,7 +1523,8 @@ implement_showing (MetaWindow *window,
|
|||||||
meta_verbose ("Implement showing = %d for window %s\n",
|
meta_verbose ("Implement showing = %d for window %s\n",
|
||||||
showing, window->desc);
|
showing, window->desc);
|
||||||
|
|
||||||
sync_client_window_mapped (window);
|
if (!window->override_redirect)
|
||||||
|
sync_client_window_mapped (window);
|
||||||
|
|
||||||
if (!showing)
|
if (!showing)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user