mirror of
https://github.com/brl/mutter.git
synced 2025-08-02 14:44:40 +00:00
Don't restack windows while we are unmanaging them
Restacking the frame for a window while unmanaging the window is harmless, but for undecorated (in particular, client-side-decorated) windows, this causes problems because the window is typically destroyed by the client immediately after withredrawing the window. Skip windows flagged as being unmanaged when assembling the new stack and when comparing the old order to the new stack. Add a stacking test for this.
This commit is contained in:
@@ -1063,7 +1063,8 @@ meta_stack_tracker_restack_managed (MetaStackTracker *tracker,
|
||||
for (old_pos = n_windows - 1; old_pos >= 0; old_pos--)
|
||||
{
|
||||
MetaWindow *old_window = meta_display_lookup_stack_id (tracker->screen->display, windows[old_pos]);
|
||||
if ((old_window && !old_window->override_redirect) || windows[old_pos] == tracker->screen->guard_window)
|
||||
if ((old_window && !old_window->override_redirect && !old_window->unmanaging) ||
|
||||
windows[old_pos] == tracker->screen->guard_window)
|
||||
break;
|
||||
}
|
||||
g_assert (old_pos >= 0);
|
||||
@@ -1093,7 +1094,7 @@ meta_stack_tracker_restack_managed (MetaStackTracker *tracker,
|
||||
}
|
||||
|
||||
MetaWindow *old_window = meta_display_lookup_stack_id (tracker->screen->display, windows[old_pos]);
|
||||
if (!old_window || old_window->override_redirect)
|
||||
if (!old_window || old_window->override_redirect || old_window->unmanaging)
|
||||
{
|
||||
old_pos--;
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user