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