summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Keller <skeller@gnome.org>2023-03-01 21:43:15 +0100
committerFlorian Müllner <fmuellner@gnome.org>2023-03-19 12:08:56 +0100
commitd70de69513187bccb0980643717cf447ca41f119 (patch)
treeed65c4b61a5df2ac21fb3149cacdf44fafb5296b
parentc35bcd628da3809eb6e4a07b8983701d4eb4bc50 (diff)
downloadgnome-shell-d70de69513187bccb0980643717cf447ca41f119.tar.gz
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 (cherry picked from commit bb42973730a1a96881cb63bf7c1e9fdc68fb9fba) Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2704>
-rw-r--r--js/ui/overview.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/ui/overview.js b/js/ui/overview.js
index a3540d4da..cd4b01b7d 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -684,6 +684,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;