diff --git a/src/core/stack.c b/src/core/stack.c index 9f37eac46..3e2654080 100644 --- a/src/core/stack.c +++ b/src/core/stack.c @@ -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; diff --git a/src/core/window.c b/src/core/window.c index 2436a7684..956f0c353 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -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 {