Fix the multimap when moving a window from/to an empty workspace

This commit is contained in:
Tor Hedin Brønner
2017-10-23 20:39:16 +02:00
parent 4f6330c025
commit 63dd855fbb
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -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();
}
},
+3
View File
@@ -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,