From 93b33cf314c1cab980d0221ce33cf8b574e4b8ee Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 19 Jul 2024 14:11:15 +0100 Subject: [PATCH] overviewControls: Make sure startup animation completes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In commit e69da36095d5093c1c7bec7a9c96c079c0b837f9, Florian Müllner wrote: > We currently complete the animation using an onComplete handler, > which only runs if the corresponding transition was stopped when > finished. > > While it is unexpected that the transition is interrupted, it can > apparently happen under some circumstances (like VMs with qlx). > The consequences of that are pretty bad, mainly due to the cover > pane that prevents input during the animation not getting removed. > > Address this by always completing the animation when the transition > is stopped, regardless of whether it completed or not. There are effectively four branches of the startup animation: 1. if Meta.is_restart() is true, no animation is run on startup; I believe this is the X11-only case of restarting the shell mid-session. 2. if Main.sessionMode.isGreeter is true, just the panel is eased onto the screen; this is the GDM case. 3. if Main.sessionMode.hasOverview is true, then a whole sequence of animations are run; this is the normal session case. 4. otherwise, the whole UI zooms in to full size, and from full transparency to full opacity; this is the Initial Setup case. The fix above handles cases 2 and 4, but not 3. This patch applies the same fix to case 3, so that the callback is always called on session startup even if the transition is interrupted. Part-of: --- js/ui/overviewControls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index a52aa85d2..7cc481240 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -846,7 +846,7 @@ class ControlsManager extends St.Widget { delay: STARTUP_ANIMATION_TIME, duration: STARTUP_ANIMATION_TIME, mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => callback(), + onStopped: () => callback(), }); }