Blame SOURCES/fix-transient-close-crash.patch

418c51
From 2e3ae76207d9367fa15a3e759e797a0bea5eea71 Mon Sep 17 00:00:00 2001
418c51
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
418c51
Date: Fri, 25 May 2018 20:18:23 +0200
418c51
Subject: [PATCH 1/2] window: Don't refuse to move focus to the grab window
418c51
418c51
We refuse to move focus while a grab operation is in place. While this
418c51
generally makes sense, there's no reason why the window that owns the
418c51
grab shouldn't be given the regular input focus as well - we pretty
418c51
much assume that the grab window is also the focus window anyway.
418c51
418c51
In fact there's a strong reason for allowing the focus change here:
418c51
If the grab window isn't the focus window, it probably has a modal
418c51
transient that is focused instead, and a likely reason for the focus
418c51
request is that the transient is being unmanaged and we must move
418c51
the focus elsewhere.
418c51
418c51
https://gitlab.gnome.org/GNOME/mutter/issues/15
418c51
---
418c51
 src/core/window.c | 1 +
418c51
 1 file changed, 1 insertion(+)
418c51
418c51
diff --git a/src/core/window.c b/src/core/window.c
418c51
index c2d9869d2..80144cc63 100644
418c51
--- a/src/core/window.c
418c51
+++ b/src/core/window.c
418c51
@@ -4601,6 +4601,7 @@ meta_window_focus (MetaWindow  *window,
418c51
               window->desc, window->input, window->take_focus);
418c51
 
418c51
   if (window->display->grab_window &&
418c51
+      window->display->grab_window != window &&
418c51
       window->display->grab_window->all_keys_grabbed &&
418c51
       !window->display->grab_window->unmanaging)
418c51
     {
418c51
-- 
418c51
2.17.1
418c51
418c51
418c51
From ba49c5298b1ae3a1e1ba52ec16d5a739115e6967 Mon Sep 17 00:00:00 2001
418c51
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
418c51
Date: Fri, 25 May 2018 21:24:17 +0200
418c51
Subject: [PATCH 2/2] window: Explicitly exclude unmanaging window from focus
418c51
 again
418c51
418c51
Since commit b3b9d9e16 we no longer have to pass the unmanaging window
418c51
to make sure we don't try to focus it again, however the parameter also
418c51
influences the focus policy by giving ancestors preference over the normal
418c51
stack order.
418c51
418c51
https://gitlab.gnome.org/GNOME/mutter/issues/15
418c51
---
418c51
 src/core/window.c | 4 +++-
418c51
 1 file changed, 3 insertions(+), 1 deletion(-)
418c51
418c51
diff --git a/src/core/window.c b/src/core/window.c
418c51
index 80144cc63..0b71744d5 100644
418c51
--- a/src/core/window.c
418c51
+++ b/src/core/window.c
418c51
@@ -1466,7 +1466,9 @@ meta_window_unmanage (MetaWindow  *window,
418c51
       meta_topic (META_DEBUG_FOCUS,
418c51
                   "Focusing default window since we're unmanaging %s\n",
418c51
                   window->desc);
418c51
-      meta_workspace_focus_default_window (window->screen->active_workspace, NULL, timestamp);
418c51
+      meta_workspace_focus_default_window (window->screen->active_workspace,
418c51
+                                           window,
418c51
+                                           timestamp);
418c51
     }
418c51
   else
418c51
     {
418c51
-- 
418c51
2.17.1
418c51