mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-05 19:56:53 +00:00
Don't look up workspace_index on _previewWorkspace
fixes #38 Removing workspaces while the multimap is active can cause crashing
This commit is contained in:
+4
-4
@@ -65,10 +65,10 @@ WindowManager.WindowManager.prototype._previewWorkspace = function(from, to, dir
|
||||
switchData.movingWindow = record;
|
||||
switchData.windows.push(switchData.movingWindow);
|
||||
actor.reparent(switchData.movingWindowBin);
|
||||
} else if (window.get_workspace().index() == from) {
|
||||
} else if (window.get_workspace() == from) {
|
||||
switchData.windows.push(record);
|
||||
actor.reparent(switchData.outGroup);
|
||||
} else if (window.get_workspace().index() == to) {
|
||||
} else if (window.get_workspace() == to) {
|
||||
switchData.windows.push(record);
|
||||
actor.reparent(switchData.inGroup);
|
||||
actor.show();
|
||||
@@ -164,8 +164,8 @@ LiveAltTab = Lang.Class({
|
||||
let toIndex = to.get_workspace().workspace_index;
|
||||
if (toIndex !== fromIndex) {
|
||||
let direction = fromIndex < toIndex ? Meta.MotionDirection.DOWN : Meta.MotionDirection.UP;
|
||||
Main.wm._previewWorkspace(from.get_workspace().workspace_index,
|
||||
to.get_workspace().workspace_index,
|
||||
Main.wm._previewWorkspace(from.get_workspace(),
|
||||
to.get_workspace(),
|
||||
direction)
|
||||
this.switchedWorkspace = true;
|
||||
}
|
||||
|
||||
@@ -866,8 +866,8 @@ PreviewedWindowNavigator = new Lang.Class({
|
||||
}
|
||||
|
||||
// This will crash gnome-shell if one of the workspaces have been removed
|
||||
Main.wm._previewWorkspace(oldMap.space.workspace.workspace_index,
|
||||
newMap.space.workspace.workspace_index,
|
||||
Main.wm._previewWorkspace(oldMap.space.workspace,
|
||||
newMap.space.workspace,
|
||||
direction);
|
||||
this.space = newMap.space;
|
||||
this._select(this.space.selectedIndex());
|
||||
|
||||
Reference in New Issue
Block a user