Commit 98fa3435 authored by Florian Müllner's avatar Florian Müllner
Browse files

window-actor: Keep in compositor's window list until destroyed

When a window is destroyed, the corresponding actor may still be
kept around for the destroy effect. But as the actor is removed
from the compositor's stack list immediately, the compositor will
always stack it above "valid" window actors - this is not what we
want, so only update the compositor's list when the actor is
actually destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=735927
parent 9ceb3fbb
......@@ -920,7 +920,7 @@ meta_compositor_sync_stack (MetaCompositor *compositor,
old_actor = old_stack->data;
old_window = meta_window_actor_get_meta_window (old_actor);
if (old_window->hidden &&
if ((old_window->hidden || old_window->unmanaging) &&
!meta_window_actor_effect_in_progress (old_actor))
{
old_stack = g_list_delete_link (old_stack, old_stack);
......@@ -954,7 +954,7 @@ meta_compositor_sync_stack (MetaCompositor *compositor,
* filtered out non-animating hidden windows above.
*/
if (old_actor &&
(!stack_actor || old_window->hidden))
(!stack_actor || old_window->hidden || old_window->unmanaging))
{
actor = old_actor;
window = old_window;
......
......@@ -1171,7 +1171,6 @@ meta_window_actor_destroy (MetaWindowActor *self)
{
MetaWindowActorPrivate *priv = self->priv;
MetaWindow *window = priv->window;
MetaCompositor *compositor = priv->compositor;
MetaWindowType window_type = meta_window_get_window_type (window);
meta_window_set_compositor_private (window, NULL);
......@@ -1182,12 +1181,6 @@ meta_window_actor_destroy (MetaWindowActor *self)
priv->send_frame_messages_timer = 0;
}
/*
* We remove the window from internal lookup hashes and thus any other
* unmap events etc fail
*/
compositor->windows = g_list_remove (compositor->windows, (gconstpointer) self);
if (window_type == META_WINDOW_DROPDOWN_MENU ||
window_type == META_WINDOW_POPUP_MENU ||
window_type == META_WINDOW_TOOLTIP ||
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment