mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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:
parent
a1bb0ec738
commit
de72065a4a
3 changed files with 18 additions and 69 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue