Skip to content

Commit

Permalink
window manager: check for windows on display 'window-entered-monitor'
Browse files Browse the repository at this point in the history
fix #173
  • Loading branch information
jonian committed Aug 30, 2020
1 parent 3837a5b commit 7856ed3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions [email protected]/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ var WindowManager = GObject.registerClass(
global.window_manager, 'destroy', this._onDestroyWindow.bind(this)
)

this.signals.connect(
global.display, 'window-entered-monitor', this._onWindowEntered.bind(this)
)

this.signals.connect(
global.display, 'notify::focus-window', this._onFocusWindow.bind(this)
)
Expand Down Expand Up @@ -405,6 +409,12 @@ var WindowManager = GObject.registerClass(
}
}

_onWindowEntered(display, index, meta_window) {
if (isValid(meta_window)) {
this.setWindow(meta_window)
}
}

_onFocusWindow(display) {
if (this.focusWindow) {
this.focusWindow.syncComponents()
Expand Down

0 comments on commit 7856ed3

Please sign in to comment.