workspace: Invalidate the current layout when windows are added or removed
If windows are removed or added, we shouldn't keep the old layout, as it's not valid anymore. If windows are removed, this is especially bad, as the rows contain references to the removed window objects, causing crashes. https://bugzilla.gnome.org/show_bug.cgi?id=698622
This commit is contained in:
@ -1257,6 +1257,7 @@ const Workspace = new Lang.Class({
|
||||
this._cursorX = x;
|
||||
this._cursorY = y;
|
||||
|
||||
this._currentLayout = null;
|
||||
this._repositionWindowsId = Mainloop.timeout_add(750,
|
||||
Lang.bind(this, this._delayedWindowRepositioning));
|
||||
},
|
||||
@ -1304,6 +1305,7 @@ const Workspace = new Lang.Class({
|
||||
clone.overlay.relayout(false);
|
||||
}
|
||||
|
||||
this._currentLayout = null;
|
||||
this._recalculateWindowPositions(WindowPositionFlags.ANIMATE);
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user