From 44be0a739f26d872f27e81bd57928b6f61920476 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Fri, 5 Sep 2025 13:23:15 -0400 Subject: [PATCH] Cleanup appicon prototype on disable --- src/panelManager.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/panelManager.js b/src/panelManager.js index 9e79a62..ace6588 100755 --- a/src/panelManager.js +++ b/src/panelManager.js @@ -68,17 +68,17 @@ export const PanelManager = class { SETTINGS.get_string('primary-monitor'), ) - // g-s version 49 switched to clutter gestures - if (!AppDisplay.AppIcon.prototype._removeMenuTimeout) - AppDisplay.AppIcon.prototype._setPopupTimeout = - AppDisplay.AppIcon.prototype._removeMenuTimeout = () => {} - this.allPanels = [] this.dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex] || Main.layoutManager.primaryMonitor this.proximityManager = new Proximity.ProximityManager() + // g-s version 49 switched to clutter gestures + if (!AppDisplay.AppIcon.prototype._removeMenuTimeout) + AppDisplay.AppIcon.prototype._setPopupTimeout = + AppDisplay.AppIcon.prototype._removeMenuTimeout = this._emptyFunc + if (this.dtpPrimaryMonitor) { this.primaryPanel = this._createPanel( this.dtpPrimaryMonitor, @@ -323,6 +323,11 @@ export const PanelManager = class { this.primaryPanel && this.overview.disable() this.proximityManager.destroy() + if (AppDisplay.AppIcon.prototype._removeMenuTimeout == this._emptyFunc) { + delete AppDisplay.AppIcon.prototype._setPopupTimeout + delete AppDisplay.AppIcon.prototype._removeMenuTimeout + } + this.allPanels.forEach((p) => { p.taskbar.iconAnimator.pause() @@ -433,6 +438,8 @@ export const PanelManager = class { ) } + _emptyFunc() {} + _setDesktopIconsMargins() { this._desktopIconsUsableArea?.resetMargins() this.allPanels.forEach((p) => {