[mutter/wip/fmuellner/focus-fix: 8/10] window: Don't refuse to move focus to the grab window

commit 7c4dbd3f8fe72320f2c7fd8d1a84f097a844a4a5
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 25 20:18:23 2018 +0200

    window: Don't refuse to move focus to the grab window
    We refuse to move focus while a grab operation is in place. While this
    generally makes sense, there's no reason why the window that owns the
    grab shouldn't be given the regular input focus as well - we pretty
    much assume that the grab window is also the focus window anyway.
    In fact there's a strong reason for allowing the focus change here:
    If the grab window isn't the focus window, it probably has a modal
    transient that is focused instead, and a likely reason for the focus
    request is that the transient is being unmanaged and we must move
    the focus elsewhere.

 src/core/window.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/src/core/window.c b/src/core/window.c
index 7ded9f3aa..5e0148c0b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -4644,6 +4644,7 @@ meta_window_focus (MetaWindow  *window,
               window->desc, window->input, window->take_focus);
   if (window->display->grab_window &&
+      window->display->grab_window != window &&
       window->display->grab_window->all_keys_grabbed &&

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]