mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
stack: Never focus unmanaging windows
We can enter weird states where get_default_window is called during window unmanagement, before the window has been fully removed from the stack. Make sure these windows are *never* returned from get_default_window, as focusing them can cause an assertion fail, or worse.
This commit is contained in:
parent
3f1f1645c7
commit
b3b9d9e161
@ -1730,6 +1730,9 @@ get_default_focus_window (MetaStack *stack,
|
||||
if (window->minimized)
|
||||
continue;
|
||||
|
||||
if (window->unmanaging)
|
||||
continue;
|
||||
|
||||
if (!(window->input || window->take_focus))
|
||||
continue;
|
||||
|
||||
|
@ -1296,9 +1296,7 @@ meta_window_unmanage (MetaWindow *window,
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing default window since we're unmanaging %s\n",
|
||||
window->desc);
|
||||
meta_workspace_focus_default_window (window->screen->active_workspace,
|
||||
window,
|
||||
timestamp);
|
||||
meta_workspace_focus_default_window (window->screen->active_workspace, NULL, timestamp);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user