From c1d3e304cba3222f0a8f2618d20b489ca5baca76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sat, 9 Feb 2019 23:40:02 +0100 Subject: [PATCH] windowManager: Only allow top-drag gesture if focus window is fullscreen The top drag gesture is not of any use if the topmost window is not a fullscreen window and will only block events near the important top screen edge (i.e. the panel). To fix this, only enable this gesture if the focus window is a fullscreen window. https://gitlab.gnome.org/GNOME/gnome-shell/issues/552 --- js/ui/windowManager.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 98bed26f2..ea9493d6f 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1076,6 +1076,15 @@ var WindowManager = class { if (currentWindow) currentWindow.unmake_fullscreen(); }); + + let updateUnfullscreenGesture = () => { + let currentWindow = global.display.focus_window; + gesture.enabled = currentWindow && currentWindow.is_fullscreen(); + } + + global.display.connect('notify::focus-window', updateUnfullscreenGesture); + global.display.connect('in-fullscreen-changed', updateUnfullscreenGesture); + global.stage.add_action(gesture); }