From 63dd855fbb09cb576f23847c77202f64e81df309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Mon, 23 Oct 2017 20:35:14 +0200 Subject: [PATCH] Fix the multimap when moving a window from/to an empty workspace --- minimap.js | 3 +++ tiling.js | 3 +++ 2 files changed, 6 insertions(+) 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,