[gnome-shell] windowManager: Add top edge drag gesture to unmake fullscreen window



commit 304c667bca9b303195f94e9d278c5f9d5bc7bcb7
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Thu Jun 7 17:52:18 2018 +0200

    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) {


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