[gnome-shell/wip/gestures: 3/10] viewSelector: add left edge drag gesture to show the app picker



commit ed6dc326d158e98f1e4ab4a6645dede7a89891d8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 25 17:52:19 2014 +0200

    viewSelector: add left edge drag gesture to show the app picker

 js/ui/viewSelector.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index e7d9b1d..eaf66ea 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -11,6 +11,7 @@ const Lang = imports.lang;
 const Shell = imports.gi.Shell;
 const St = imports.gi.St;
 
+const EdgeDragAction = imports.ui.edgeDragAction;
 const AppDisplay = imports.ui.appDisplay;
 const Main = imports.ui.main;
 const OverviewControls = imports.ui.overviewControls;
@@ -145,6 +146,14 @@ const ViewSelector = new Lang.Class({
                               Shell.KeyBindingMode.OVERVIEW,
                               Lang.bind(Main.overview, Main.overview.toggle));
 
+        let gesture = new EdgeDragAction.EdgeDragAction(St.Side.RIGHT);
+        gesture.connect('activated', Lang.bind(this, function() {
+            if (Main.overview.visible)
+                Main.overview.hide();
+            else
+                this.showApps();
+        }));
+        global.stage.add_action(gesture);
     },
 
     _toggleAppsPage: function() {


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