[gnome-shell] workspacesView: Adapt to changes in windowManager
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Adapt to changes in windowManager
- Date: Tue, 21 May 2013 20:43:00 +0000 (UTC)
commit e0a6a623d2ca349d8f8f373b79a452586c219124
Author: Florian Müllner <fmuellner gnome org>
Date: Sat May 18 20:53:49 2013 +0200
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 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 25140a8..50f079c 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]