From 5f2b199627ae8c0bb191b2e6cbdf25552ad9d280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 1 Dec 2023 19:11:27 +0100 Subject: [PATCH] Revert "workspace-indicator: Only initialize preview visibility on map" It is not possible to unmap an actor from within the map vfunc, so the fix broke the initial visibility again. This reverts commit 25a75e1b0e51d472230c914f3cdcda31a1ff8b8a. Part-of: --- extensions/workspace-indicator/extension.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js index 32f56807..e15567f2 100644 --- a/extensions/workspace-indicator/extension.js +++ b/extensions/workspace-indicator/extension.js @@ -49,6 +49,7 @@ class WindowPreview extends St.Button { }, 'notify::minimized', this._updateVisible.bind(this), this); + this._updateVisible(); global.display.connectObject('notify::focus-window', this._onFocusChanged.bind(this), this); @@ -60,12 +61,6 @@ class WindowPreview extends St.Button { return this._window; } - vfunc_map() { - super.vfunc_map(); - // initialize visibility after being added to the stage - setTimeout(() => this._updateVisible()); - } - _onFocusChanged() { if (global.display.focus_window === this._window) this.add_style_class_name('active');