mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-08-12 20:20:29 +00:00
Fix the multimap when moving a window from/to an empty workspace
This commit is contained in:
@@ -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();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user