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:18:36 +0100
commitb2566d84ad14545df66726624f94587a0f59950e (patch)
tree45a9ea8fddb7f9b735845ef6532649160378b2f2
parent489a32f79a4bbd2095472686cbb879e7f4aad05c (diff)
downloadgnome-shell-b2566d84ad14545df66726624f94587a0f59950e.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/2705>
-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 88451137c..254dc8edb 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -682,6 +682,12 @@ var Overview = class {
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;