diff --git a/minimap.js b/minimap.js index b1c8332..a7c29ac 100644 --- a/minimap.js +++ b/minimap.js @@ -185,6 +185,9 @@ Minimap = new Lang.Class({ this.layout(false); let frame = this.space.selectedWindow.get_frame_rect(); this.sync(frame.x, false); + } else { + // We're in an empty workspace so can just remove what's left + this.minimapActor.remove_all_children(); } }, diff --git a/tiling.js b/tiling.js index ddd122d..207c173 100644 --- a/tiling.js +++ b/tiling.js @@ -198,6 +198,9 @@ insertWindow = function(space, metaWindow, index) { space.splice(index, 0, metaWindow); if (index == 0) { + // If the workspace was empty the inserted window should be selected + space.selectedWindow = metaWindow; + let frame = metaWindow.get_frame_rect(); metaWindow.scrollwm_initial_position = {x: primary.x + (primary.width - frame.width)/2,