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:
Jasper St. Pierre 2014-09-04 13:53:06 -07:00
parent 3f1f1645c7
commit b3b9d9e161
2 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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
{