mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Fix Gnome super+v and super+s when panel hidden
gh-1560
This commit is contained in:
@@ -139,13 +139,12 @@ export const Intellihide = class {
|
||||
}
|
||||
|
||||
this._setTrackPanel(false)
|
||||
|
||||
this._signalsHandler.destroy()
|
||||
this._timeoutsHandler.destroy()
|
||||
|
||||
this._removeRevealMechanism()
|
||||
|
||||
this._revealPanel(!reset)
|
||||
|
||||
this._signalsHandler.destroy()
|
||||
this._timeoutsHandler.destroy()
|
||||
}
|
||||
|
||||
destroy() {
|
||||
@@ -163,7 +162,7 @@ export const Intellihide = class {
|
||||
)
|
||||
}
|
||||
|
||||
revealAndHold(holdStatus) {
|
||||
revealAndHold(holdStatus, immediate) {
|
||||
if (
|
||||
!this.enabled ||
|
||||
(holdStatus == Hold.NOTIFY &&
|
||||
@@ -172,7 +171,7 @@ export const Intellihide = class {
|
||||
)
|
||||
return
|
||||
|
||||
if (!this._holdStatus) this._revealPanel()
|
||||
if (!this._holdStatus) this._revealPanel(immediate)
|
||||
|
||||
this._holdStatus |= holdStatus
|
||||
|
||||
@@ -399,7 +398,7 @@ export const Intellihide = class {
|
||||
Main.overview.visibleTarget ||
|
||||
this._dtpPanel.taskbar.previewMenu.opened ||
|
||||
this._dtpPanel.taskbar._dragMonitor ||
|
||||
this._panelBox.get_hover() ||
|
||||
this._hover ||
|
||||
(this._dtpPanel.geom.position == St.Side.TOP &&
|
||||
Main.layoutManager.panelBox.get_hover()) ||
|
||||
this._checkIfGrab()
|
||||
@@ -488,9 +487,17 @@ export const Intellihide = class {
|
||||
Utils.stopAnimations(this._panelBox)
|
||||
this._animationDestination = destination
|
||||
|
||||
let update = () =>
|
||||
this._timeoutsHandler.add([
|
||||
T3,
|
||||
POST_ANIMATE_MS,
|
||||
() => this._queueUpdatePanelPosition(),
|
||||
])
|
||||
|
||||
if (immediate) {
|
||||
this._panelBox[this._translationProp] = destination
|
||||
this._panelBox.visible = !destination
|
||||
update()
|
||||
} else if (destination !== this._panelBox[this._translationProp]) {
|
||||
let tweenOpts = {
|
||||
//when entering/leaving the overview, use its animation time instead of the one from the settings
|
||||
@@ -506,11 +513,7 @@ export const Intellihide = class {
|
||||
onComplete: () => {
|
||||
this._panelBox.visible = !destination
|
||||
Main.layoutManager._queueUpdateRegions()
|
||||
this._timeoutsHandler.add([
|
||||
T3,
|
||||
POST_ANIMATE_MS,
|
||||
() => this._queueUpdatePanelPosition(),
|
||||
])
|
||||
update()
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
13
src/panel.js
13
src/panel.js
@@ -166,6 +166,18 @@ export const Panel = GObject.registerClass(
|
||||
this.statusArea = Main.panel.statusArea
|
||||
this.menuManager = Main.panel.menuManager
|
||||
|
||||
this.panel._toggleMenu = (indicator) => {
|
||||
if (
|
||||
!indicator ||
|
||||
(!this.intellihide.enabled && !indicator.mapped) ||
|
||||
!indicator.reactive
|
||||
)
|
||||
return
|
||||
|
||||
this.intellihide.revealAndHold(0, true)
|
||||
Object.getPrototypeOf(this.panel)._toggleMenu(indicator)
|
||||
}
|
||||
|
||||
panelBoxes.forEach((p) => (this[p] = Main.panel[p]))
|
||||
;['activities', systemMenuInfo.name, 'dateMenu'].forEach((b) => {
|
||||
let container = this.statusArea[b].container
|
||||
@@ -458,6 +470,7 @@ export const Panel = GObject.registerClass(
|
||||
|
||||
this._setShowDesktopButton(false)
|
||||
|
||||
delete this.panel._toggleMenu
|
||||
delete Utils.getIndicators(
|
||||
this.statusArea[systemMenuName]._volumeOutput,
|
||||
)._dtpIgnoreScroll
|
||||
|
||||
Reference in New Issue
Block a user