Skip to content

Commit

Permalink
window buttons: fix button visibility on focus app changes
Browse files Browse the repository at this point in the history
fix #346
  • Loading branch information
jonian committed Oct 16, 2023
1 parent 49a4576 commit 7b50317
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion unite@hardpixel.eu/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class WindowButtons extends Handlers.Feature {
)

this.signals.connect(
WinTracker, 'notify::focus-app', this._syncVisible.bind(this)
WinTracker, 'notify::focus-app', this._onFocusAppChanged.bind(this)
)

this.signals.connect(
Expand Down Expand Up @@ -341,6 +341,14 @@ class WindowButtons extends Handlers.Feature {
}
}

_onFocusAppChanged() {
if (!WinTracker.focus_app) {
if (global.stage.key_focus != null) return
}

this._syncVisible()
}

_syncVisible() {
const overview = Main.overview.visibleTarget
const focusApp = WinTracker.focus_app
Expand Down

0 comments on commit 7b50317

Please sign in to comment.