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
This commit is contained in:
Jan-Michael Brummer 2018-06-07 17:52:18 +02:00
parent 879a81abeb
commit 304c667bca

View File

@ -999,6 +999,14 @@ var WindowManager = new Lang.Class({
Main.keyboard.show(Main.layoutManager.bottomIndex); Main.keyboard.show(Main.layoutManager.bottomIndex);
}); });
global.stage.add_action(gesture); 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) { _showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {