summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2019-07-03 18:11:46 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2019-07-03 18:13:25 +0200
commit84616bef27fb193cff901ca2a8b1ab65b6356c0e (patch)
treec18c3392025708d1c43877331459f98d39611ee4 /src
parent040de396b2ac2ea36de91a1173e84e44421efff3 (diff)
downloadmutter-84616bef27fb193cff901ca2a8b1ab65b6356c0e.tar.gz
window: Allow grab if the display focus is unset
As per commit 040de396b, we don't try to grab when shortcuts are inhibited, However, this uses the focus window assuming that it is always set, while this might not be the case in some scenarios (like when unsetting the focus before requesting take-focus-window to acquire the input). So allow the button grab even if the focus window is not set for the display Closes: https://gitlab.gnome.org/GNOME/mutter/issues/663 https://gitlab.gnome.org/GNOME/mutter/merge_requests/668
Diffstat (limited to 'src')
-rw-r--r--src/core/window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 185c92534..4c0761d70 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8342,7 +8342,7 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
event_mods = clutter_event_get_state (event);
unmodified = (event_mods & grab_mods) == 0;
source = clutter_event_get_source_device (event);
- is_window_button_grab_allowed =
+ is_window_button_grab_allowed = !display->focus_window ||
!meta_window_shortcuts_inhibited (display->focus_window, source);
is_window_grab = (is_window_button_grab_allowed &&
((event_mods & grab_mods) == grab_mods));