mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-06 20:07:02 +00:00
Fix slurp and barf when navigating
Simply rebuild all the clones whenever we execute a non-navigating action. This is a bit ad-hoc and the whole minimap should probably be rewritten using signals emitted when the associated space changes (eg. on `space.addWindow`).
This commit is contained in:
+4
-2
@@ -386,9 +386,11 @@ var PreviewedWindowNavigator = new Lang.Class({
|
||||
&& action.name !== 'toggle-scratch') {
|
||||
let metaWindow = this.windows[this._selectedIndex];
|
||||
action.handler(null, null, metaWindow);
|
||||
this.windows = this.space.getWindows();
|
||||
this._selectedIndex = this.windows.indexOf(this.space.selectedWindow);
|
||||
let minimap = this.minimap;
|
||||
minimap.layout(false);
|
||||
this.minimap.select(this._selectedIndex);
|
||||
minimap.show();
|
||||
minimap.select();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1487,7 +1487,7 @@ function slurp(metaWindow) {
|
||||
space.removeWindow(rightNeigbour);
|
||||
let column = space[index];
|
||||
space.addWindow(rightNeigbour, index, column.length);
|
||||
ensureViewport(global.display.focus_window, spaces.spaceOfWindow(global.display.focus_window), true);
|
||||
ensureViewport(space.selectedWindow, space, true);
|
||||
}
|
||||
|
||||
function barf(metaWindow) {
|
||||
@@ -1503,5 +1503,5 @@ function barf(metaWindow) {
|
||||
let bottom = column[column.length - 1];
|
||||
space.removeWindow(bottom);
|
||||
space.addWindow(bottom, index + 1);
|
||||
ensureViewport(global.display.focus_window, spaces.spaceOfWindow(global.display.focus_window), true);
|
||||
ensureViewport(space.selectedWindow, space, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user