From e0a6a623d2ca349d8f8f373b79a452586c219124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 18 May 2013 20:53:49 +0200 Subject: [PATCH] workspacesView: Adapt to changes in windowManager The actionMoveWorkspace() function was changed in commit 8727661c1, adapt its use in workspacesView as well. https://bugzilla.gnome.org/show_bug.cgi?id=659288 --- js/ui/workspacesView.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 25140a8f1..50f079c3e 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -760,15 +760,20 @@ const WorkspacesDisplay = new Lang.Class({ _onScrollEvent: function(actor, event) { if (!this.actor.mapped) return false; + let activeWs = global.screen.get_active_workspace(); + let ws; switch (event.get_scroll_direction()) { case Clutter.ScrollDirection.UP: - Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP); - return true; + ws = activeWs.get_neighbor(Meta.MotionDirection.UP); + break; case Clutter.ScrollDirection.DOWN: - Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN); - return true; + ws = activeWs.get_neighbor(Meta.MotionDirection.DOWN); + break; + default: + return false; } - return false; + Main.wm.actionMoveWorkspace(ws); + return true; } }); Signals.addSignalMethods(WorkspacesDisplay.prototype);