Skip to content

Commit

Permalink
fix dock visibility on fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Jul 23, 2023
1 parent 2c006d8 commit a6bda0c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/dock.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export class Dock extends St.Bin {
this.signals = new Signals()
this.setting = new Settings()

this.signals.connect(
global.display, 'in-fullscreen-changed', this._syncVisible.bind(this)
)

this.signals.connect(
Main.layoutManager, 'monitors-changed', this._updateGeometry.bind(this)
)
Expand Down Expand Up @@ -61,6 +65,10 @@ export class Dock extends St.Bin {
return Main.layoutManager.primaryMonitor
}

get shouldHide() {
return Main.overview.visibleTarget || this.monitor.inFullscreen
}

enable() {
Main.layoutManager.addChrome(this, {
affectsInputRegion:true,
Expand Down Expand Up @@ -116,7 +124,7 @@ export class Dock extends St.Bin {
}

_syncVisible() {
if (Main.overview.visibleTarget) {
if (this.shouldHide) {
this.hide()
} else {
this.show()
Expand Down

0 comments on commit a6bda0c

Please sign in to comment.