window: Ensure that visible_to_compositor is set when unmanaging

visible_to_compositor should always be in sync with show_window /
hide_window calls, even when unmananging.

This fixes a crash where we call sync_window_state when the window
is unmanaging, since we use visible_to_compositor to determine whether
the compositor will crash.

This is actually wrong; we should be using the knowledge about
whether we have called add_window / remove_window. We'll introduce
this with a new boolean next time.
This commit is contained in:
Jasper St. Pierre 2014-03-28 13:51:34 -04:00
parent e10fd19d24
commit ed9dbf6aa2

View File

@ -1469,8 +1469,11 @@ meta_window_unmanage (MetaWindow *window,
meta_wayland_surface_window_unmanaged (window->surface);
if (window->visible_to_compositor)
meta_compositor_hide_window (window->display->compositor, window,
META_COMP_EFFECT_DESTROY);
{
window->visible_to_compositor = FALSE;
meta_compositor_hide_window (window->display->compositor, window,
META_COMP_EFFECT_DESTROY);
}
meta_compositor_remove_window (window->display->compositor, window);