[gnome-shell/wip/gestures: 6/10] viewSelector: Show the overview on 3-finger pinch gestures



commit dc7cca7e6d46e3eeefc3b22108da59b696cff59b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 25 18:12:04 2014 +0200

    viewSelector: Show the overview on 3-finger pinch gestures

 js/ui/viewSelector.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index eaf66ea..3d335eb 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() {


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