WorkspaceSwitcher: simplify code for handling keybindings
Most of code implementing workspace switches was repeated with minor differences on each direction. Instead, consolidate it and use the new meta_workspace_get_neighbor. https://bugzilla.gnome.org/show_bug.cgi?id=674104
This commit is contained in:
@ -1048,10 +1048,10 @@ const WorkspacesDisplay = new Lang.Class({
|
||||
_onScrollEvent: function (actor, event) {
|
||||
switch ( event.get_scroll_direction() ) {
|
||||
case Clutter.ScrollDirection.UP:
|
||||
Main.wm.actionMoveWorkspaceUp();
|
||||
Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP);
|
||||
break;
|
||||
case Clutter.ScrollDirection.DOWN:
|
||||
Main.wm.actionMoveWorkspaceDown();
|
||||
Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user