From dc7cca7e6d46e3eeefc3b22108da59b696cff59b Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 25 Jun 2014 18:12:04 +0200 Subject: [PATCH] viewSelector: Show the overview on 3-finger pinch gestures --- js/ui/viewSelector.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index eaf66ea88..3d335eb2d 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -12,6 +12,7 @@ const Shell = imports.gi.Shell; const St = imports.gi.St; const EdgeDragAction = imports.ui.edgeDragAction; +const ShowOverviewAction = imports.ui.showOverviewAction; const AppDisplay = imports.ui.appDisplay; const Main = imports.ui.main; const OverviewControls = imports.ui.overviewControls; @@ -154,6 +155,13 @@ const ViewSelector = new Lang.Class({ this.showApps(); })); global.stage.add_action(gesture); + + gesture = new ShowOverviewAction.ShowOverviewAction(); + gesture.connect('activated', Lang.bind(this, function(action, areaDiff) { + if (areaDiff < 0.7) + Main.overview.show(); + })); + global.stage.add_action(gesture); }, _toggleAppsPage: function() {