From 304c667bca9b303195f94e9d278c5f9d5bc7bcb7 Mon Sep 17 00:00:00 2001 From: Jan-Michael Brummer Date: Thu, 7 Jun 2018 17:52:18 +0200 Subject: [PATCH] windowManager: Add top edge drag gesture to unmake fullscreen window Fullscreen windows cannot be restored by touch device users unless the application adds support for it. As it is unlikely to change all application lets introduce a top edge drag gesture which unmakes fullscreen windows. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/123 --- js/ui/windowManager.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index bab93a03e..b831071a0 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -999,6 +999,14 @@ var WindowManager = new Lang.Class({ Main.keyboard.show(Main.layoutManager.bottomIndex); }); global.stage.add_action(gesture); + + gesture = new EdgeDragAction.EdgeDragAction(St.Side.TOP, mode); + gesture.connect('activated', () => { + let currentWindow = global.display.focus_window; + if (currentWindow) + currentWindow.unmake_fullscreen(); + }); + global.stage.add_action(gesture); }, _showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {