[mutter] stack: Never focus unmanaging windows
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] stack: Never focus unmanaging windows
- Date: Thu, 4 Sep 2014 20:57:46 +0000 (UTC)
commit b3b9d9e1617f350a2a3f3a62c8572a8ca2547f3a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Sep 4 13:53:06 2014 -0700
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.
src/core/stack.c | 3 +++
src/core/window.c | 4 +---
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index 9f37eac..3e26540 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 2436a76..956f0c3 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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]