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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2667>
This commit is contained in:
Sebastian Keller 2023-03-01 21:43:15 +01:00 committed by Marge Bot
parent 623ab2b85c
commit bb42973730

View File

@ -683,6 +683,12 @@ var Overview = class extends Signals.EventEmitter {
this._changeShownState(OverviewShownState.SHOWING); this._changeShownState(OverviewShownState.SHOWING);
this._overview.runStartupAnimation(() => { this._overview.runStartupAnimation(() => {
// Overview got hidden during startup animation
if (this._shownState !== OverviewShownState.SHOWING) {
callback();
return;
}
if (!this._syncGrab()) { if (!this._syncGrab()) {
callback(); callback();
return; return;