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

This commit is contained in:
Carlos Garnacho 2014-06-25 17:52:19 +02:00
parent 13b4290e55
commit ed6dc326d1

View File

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