diff --git a/navigator.js b/navigator.js index 1e5a16b..3ab473b 100644 --- a/navigator.js +++ b/navigator.js @@ -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; } } diff --git a/tiling.js b/tiling.js index 97ad764..3eca0b6 100644 --- a/tiling.js +++ b/tiling.js @@ -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); }