[gnome-shell/gnome-41] st/theme-node-transition: Guard against 0-sized offscreen box



commit 29bd8262fb4d198329d2c968f0dab1abab4dfedd
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jun 3 03:19:04 2022 +0200

    st/theme-node-transition: Guard against 0-sized offscreen box
    
    We know beforehand that setting up the framebuffers will fail in
    that case, so we can avoid cluttering the log with warnings.
    
    (Although the warning would likely indicate a stylesheet bug)
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/289
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2326>
    (cherry picked from commit 71d503dc6e5aa4a08bbd9df01b3034f0a5d5786c)

 src/st/st-theme-node-transition.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/st/st-theme-node-transition.c b/src/st/st-theme-node-transition.c
index 61199b437e..20b1476d2d 100644
--- a/src/st/st-theme-node-transition.c
+++ b/src/st/st-theme-node-transition.c
@@ -369,7 +369,8 @@ st_theme_node_transition_paint (StThemeNodeTransition *transition,
       priv->last_allocation = *allocation;
 
       calculate_offscreen_box (transition, allocation);
-      priv->needs_setup = !setup_framebuffers (transition, allocation,
+      priv->needs_setup = clutter_actor_box_get_area (&priv->offscreen_box) == 0 ||
+                          !setup_framebuffers (transition, allocation,
                                                resource_scale);
 
       if (priv->needs_setup) /* setting up framebuffers failed */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]