From da020e361a1ebdbbdd70754f7e87755239b28803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 7 Mar 2023 02:13:43 +0100 Subject: [PATCH] appIndicator: Do not try to initialize an indicator not in stage yet Even if an indicator is ready we should not try to update it if it's not in stage because we depend on the theme node --- appIndicator.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/appIndicator.js b/appIndicator.js index 9c69309..0bbd539 100644 --- a/appIndicator.js +++ b/appIndicator.js @@ -980,7 +980,17 @@ class AppIndicatorsIconActor extends St.Icon { if (indicator.isReady) { this._updateCustomIcons(); - this._invalidateIcon(); + + if (this.get_stage()) { + this._invalidateIcon(); + } else { + const id = this.connect('parent-set', () => { + if (this.get_stage()) { + this.disconnect(id); + this._invalidateIcon(); + } + }); + } } this.connect('destroy', () => {