From 3f85953452681f4e21145ea5f4ccd637313eadd5 Mon Sep 17 00:00:00 2001 From: DanS Date: Wed, 14 Oct 2026 12:36:43 -0500 Subject: [PATCH] perf(ui): stop backdrop effects requesting frames behind a modal While a blur overlay (a modal dialog or the lock screen) covers the window, the theme backdrop effects kept requesting animation frames even though they are not visible, so the app never went idle and re-rendered continuously. The ambient animation predicate now drops the backdrop-effects term when a blur overlay was active last frame. Reduce Motion and the unfocused/hidden throttle were already handled, and the overlay's own moving elements (the lock screen's unlock dots, a spinner) still request frames through the progress term, so nothing on screen freezes. Co-Authored-By: Claude Opus 4.8 --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 23596eb..9b7af44 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2359,8 +2359,12 @@ int main(int argc, char* argv[]) const bool backdropNeedsFrames = (backdrop_active || app.getGradientTexture() != 0) && !opaqueBackground; const bool reduceMotion = app.settings() && app.settings()->getReduceMotion(); + // C128: suppress backdrop theme-effect frame requests while a blur overlay (a modal dialog or + // the lock screen) covers them -- they aren't visible, and the overlay's own moving elements + // request frames via RequestProgressFrame(), so this never freezes anything on screen. const bool effectsAnimating = !reduceMotion - && dragonx::ui::effects::ThemeEffects::instance().hasActiveAnimation(); + && dragonx::ui::effects::ThemeEffects::instance().hasActiveAnimation() + && !dragonx::ui::material::AnyBlurOverlayActiveLastFrame(); const bool ambient = effectsAnimating || backdropNeedsFrames || avatarAnimating