Fix invisible panel on async sessionUpdated

#2380
This commit is contained in:
Charles Gagnon
2025-09-19 21:21:10 -04:00
parent 114d871498
commit 47e0be962a

View File

@@ -78,6 +78,14 @@ export const PanelManager = class {
AppDisplay.AppIcon.prototype._setPopupTimeout = AppDisplay.AppIcon.prototype._setPopupTimeout =
AppDisplay.AppIcon.prototype._removeMenuTimeout = this._emptyFunc AppDisplay.AppIcon.prototype._removeMenuTimeout = this._emptyFunc
Main.layoutManager.findIndexForActor = (actor) =>
'_dtpIndex' in actor
? actor._dtpIndex
: Layout.LayoutManager.prototype.findIndexForActor.call(
Main.layoutManager,
actor,
)
if (this.dtpPrimaryMonitor) { if (this.dtpPrimaryMonitor) {
this.primaryPanel = this._createPanel( this.primaryPanel = this._createPanel(
this.dtpPrimaryMonitor, this.dtpPrimaryMonitor,
@@ -127,14 +135,6 @@ export const PanelManager = class {
) )
Main.layoutManager._updateHotCorners() Main.layoutManager._updateHotCorners()
Main.layoutManager.findIndexForActor = (actor) =>
'_dtpIndex' in actor
? actor._dtpIndex
: Layout.LayoutManager.prototype.findIndexForActor.call(
Main.layoutManager,
actor,
)
this._forceHotCornerId = SETTINGS.connect( this._forceHotCornerId = SETTINGS.connect(
'changed::stockgs-force-hotcorner', 'changed::stockgs-force-hotcorner',
() => Main.layoutManager._updateHotCorners(), () => Main.layoutManager._updateHotCorners(),
@@ -670,10 +670,6 @@ export const PanelManager = class {
Main.layoutManager.addChrome(clipContainer, { affectsInputRegion: false }) Main.layoutManager.addChrome(clipContainer, { affectsInputRegion: false })
clipContainer.add_child(panelBox) clipContainer.add_child(panelBox)
Main.layoutManager.trackChrome(panelBox, {
trackFullscreen: true,
affectsStruts: true,
})
panel = new Panel.Panel( panel = new Panel.Panel(
this, this,
@@ -685,14 +681,19 @@ export const PanelManager = class {
panelBox.add_child(panel) panelBox.add_child(panel)
panel.enable() panel.enable()
panelBox._dtpIndex = monitor.index
panelBox.set_position(0, 0)
panelBox.set_width(-1)
Main.layoutManager.trackChrome(panel, { Main.layoutManager.trackChrome(panel, {
affectsInputRegion: true, affectsInputRegion: true,
affectsStruts: false, affectsStruts: false,
}) })
panelBox._dtpIndex = monitor.index Main.layoutManager.trackChrome(panelBox, {
panelBox.set_position(0, 0) trackFullscreen: true,
panelBox.set_width(-1) affectsStruts: true,
})
this._findPanelMenuButtons(panelBox).forEach((pmb) => this._findPanelMenuButtons(panelBox).forEach((pmb) =>
this._adjustPanelMenuButton(pmb, monitor, panel.geom.position), this._adjustPanelMenuButton(pmb, monitor, panel.geom.position),