[gnome-shell/wip/gestures: 8/10] windowManager: switch workspaces on 4-finger drag
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/gestures: 8/10] windowManager: switch workspaces on 4-finger drag
- Date: Fri, 27 Jun 2014 22:05:30 +0000 (UTC)
commit 247a42ccc49a7b4aa374dabea0f5b32006eb84b6
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 25 18:13:26 2014 +0200
windowManager: switch workspaces on 4-finger drag
The workspace to switch is obtained from the direction received
by the WorkspaceSwitchAction gesture.
js/ui/windowManager.js | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 431deb1..b02e93d 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -11,6 +11,7 @@ const St = imports.gi.St;
const Shell = imports.gi.Shell;
const AltTab = imports.ui.altTab;
+const WorkspaceSwitchAction = imports.ui.workspaceSwitchAction;
const WorkspaceSwitcherPopup = imports.ui.workspaceSwitcherPopup;
const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog;
@@ -683,6 +684,13 @@ const WindowManager = new Lang.Class({
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
false, -1, 1);
+
+ let gesture = new WorkspaceSwitchAction.WorkspaceSwitchAction();
+ gesture.connect('activated', Lang.bind(this, function(action, direction) {
+ let newWs = global.screen.get_active_workspace().get_neighbor(direction);
+ this.actionMoveWorkspace(newWs);
+ }));
+ global.stage.add_action(gesture);
},
keepWorkspaceAlive: function(workspace, duration) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]