Skip to content

Commit

Permalink
Improve stacking order when focused
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmaranan committed Oct 30, 2022
1 parent d9bf733 commit 07ac521
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions window.js
Original file line number Diff line number Diff line change
Expand Up @@ -1333,11 +1333,13 @@ var WindowManager = GObject.registerClass(
}),
metaWindow.connect("focus", (_metaWindowFocus) => {
this.queueEvent({
name: "focus-border-update",
name: "focus-update",
callback: () => {
this.unfreezeRender();
this.updateBorderLayout();
this.updateDecorationLayout();
this.updateStackedFocus();
this.updateTabbedFocus();
this.freezeRender();
},
});
Expand Down Expand Up @@ -1418,7 +1420,9 @@ var WindowManager = GObject.registerClass(
const parentNode = focusNodeWindow.parentNode;
if (parentNode.layout === Tree.LAYOUT_TYPES.STACKED && !this._freezeRender) {
parentNode.appendChild(focusNodeWindow);
focusNodeWindow.nodeValue.raise();
parentNode.childNodes
.filter((child) => child.isWindow())
.forEach((child) => child.nodeValue.raise());
this.queueEvent({
name: "render-focus-stack",
callback: () => {
Expand Down

0 comments on commit 07ac521

Please sign in to comment.