From bb42973730a1a96881cb63bf7c1e9fdc68fb9fba Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 1 Mar 2023 21:43:15 +0100 Subject: [PATCH] overview: Don't claim to be SHOWN when HIDDEN during startup animation When the overview gets hidden during the startup animation, the callback would still change the state to SHOWN, despite the overview not being shown. This can happen for example if a `monitors-changed` signal triggers a relayout during startup. See: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2514#note_1683525 Part-of: --- js/ui/overview.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/ui/overview.js b/js/ui/overview.js index 4dd59d4ae..22bd4c4f5 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -683,6 +683,12 @@ var Overview = class extends Signals.EventEmitter { this._changeShownState(OverviewShownState.SHOWING); this._overview.runStartupAnimation(() => { + // Overview got hidden during startup animation + if (this._shownState !== OverviewShownState.SHOWING) { + callback(); + return; + } + if (!this._syncGrab()) { callback(); return;