From 4aad71e4371895cd4f13852f283cbe6bbf2911dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 18 Apr 2024 19:27:15 +0200 Subject: [PATCH] docking: Use the signal handler to disconnect on startup-completed signal As requested by the g.e.o review, it's not really a big deal though since this signal is going to really last few frames and the extension is not really unloaded by that time. --- docking.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docking.js b/docking.js index b852dfea9..23ffd34a6 100644 --- a/docking.js +++ b/docking.js @@ -65,6 +65,7 @@ const Labels = Object.freeze({ MAIN_DASH: Symbol('main-dash'), OLD_DASH_CHANGES: Symbol('old-dash-changes'), SETTINGS: Symbol('settings'), + STARTUP_ANIMATION: Symbol('startup-animation'), WORKSPACE_SWITCH_SCROLL: Symbol('workspace-switch-scroll'), }); @@ -467,7 +468,6 @@ const DockedDash = GObject.registerClass({ if (Main.overview.visibleTarget) this._onOverviewShowing(); - this._updateAutoHideBarriers(); } @@ -2421,11 +2421,12 @@ export class DockManager { if (this._settings.disableOverviewOnStartup) Main.sessionMode.hasOverview = false; - const id = Main.layoutManager.connect('startup-complete', () => { - Main.sessionMode.hasOverview = hadOverview; - Main.layoutManager.disconnect(id); - this._runStartupAnimation(); - }); + this._signalsHandler.addWithLabel(Labels.STARTUP_ANIMATION, + Main.layoutManager, 'startup-complete', () => { + this._signalsHandler.removeWithLabel(Labels.STARTUP_ANIMATION); + Main.sessionMode.hasOverview = hadOverview; + this._runStartupAnimation(); + }); } }