Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/extension/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ export class Node extends GObject.Object {
case NODE_TYPES.MONITOR:
case NODE_TYPES.ROOT:
case NODE_TYPES.WORKSPACE:
if (this.actor) {
// (a container split off a window that was never laid out gets no rect until the next
// render, #540)
if (this.actor && rect) {
this.actor.set_size(rect.width, rect.height);
this.actor.set_position(rect.x, rect.y);
}
Expand Down
6 changes: 5 additions & 1 deletion lib/extension/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,11 @@ export class WindowManager extends GObject.Object {
*/
trackWindow(_display, metaWindow) {
let autoSplit = this.ext.settings.get_boolean("auto-split-enabled");
if (autoSplit && this.focusMetaWindow) {
// Only for a window that is new to the tree: trackCurrentWindows() re-tracks every window
// after a workspace is added or removed, and splitting again for each of them wrapped the
// focused window in one more container each time (#540)
const isNewWindow = this._validWindow(metaWindow) && !this.tree.findNode(metaWindow);
if (autoSplit && isNewWindow && this.focusMetaWindow) {
let currentFocusNode = this.tree.findNode(this.focusMetaWindow);
if (currentFocusNode) {
let currentParentFocusNode = currentFocusNode.parentNode;
Expand Down