mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-05 03:46:53 +00:00
Don't try to preview worksapces that doesn't exist
This commit is contained in:
@@ -721,6 +721,8 @@ PreviewedWindowNavigator = new Lang.Class({
|
||||
let multimap = this._switcherList.actor;
|
||||
let from = multimap.selectedIndex;
|
||||
let to = from - 1;
|
||||
if (to < 0)
|
||||
return;
|
||||
Main.wm._previewWorkspaceDone();
|
||||
Main.wm._previewWorkspace(from, to, Meta.MotionDirection.UP);
|
||||
multimap.setSelected(to);
|
||||
@@ -733,6 +735,8 @@ PreviewedWindowNavigator = new Lang.Class({
|
||||
let multimap = this._switcherList.actor;
|
||||
let from = multimap.selectedIndex;
|
||||
let to = from + 1;
|
||||
if (to >= spaces.length)
|
||||
return;
|
||||
Main.wm._previewWorkspaceDone();
|
||||
Main.wm._previewWorkspace(from, to, Meta.MotionDirection.DOWN);
|
||||
multimap.setSelected(to);
|
||||
|
||||
Reference in New Issue
Block a user