[gnome-shell/wip/gestures: 6/8] viewSelector: Show the overview on 3-finger pinch gestures
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/gestures: 6/8] viewSelector: Show the overview on 3-finger pinch gestures
- Date: Wed, 25 Jun 2014 16:20:51 +0000 (UTC)
commit 7f166fe544d1e041231ea84839d72cd49ea8fe2f
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 | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 0ff08e5..58e6334 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 EdgeDrag = imports.ui.edgeDrag;
+const ShowOverviewAction = imports.ui.showOverviewAction;
const AppDisplay = imports.ui.appDisplay;
const Main = imports.ui.main;
const OverviewControls = imports.ui.overviewControls;
@@ -154,6 +155,14 @@ const ViewSelector = new Lang.Class({
this.showApps();
}));
global.stage.add_action(gesture);
+
+ gesture = new ShowOverviewAction.ShowOverviewAction();
+ gesture.connect('gesture-end', Lang.bind(this, function() {
+ let areaDiff = gesture.getAreaDiff();
+ 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]