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
This commit is contained in:
Jonas Dreßler 2019-02-09 23:40:02 +01:00 committed by Florian Müllner
parent 1b169655ac
commit c1d3e304cb

View File

@ -1076,6 +1076,15 @@ var WindowManager = class {
if (currentWindow) if (currentWindow)
currentWindow.unmake_fullscreen(); 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); global.stage.add_action(gesture);
} }