[gtk/fixed-fixed] fixed layout: Actually set child transforms



commit 173952cbc8dd7eec08bca97a1d322473aafb027f
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 8 10:34:04 2020 -0500

    fixed layout: Actually set child transforms
    
    The code was unintentionally appending to the
    existing child transform, leading to ever-moving
    children when you call gtk_fixed_put.

 gtk/gtkfixedlayout.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkfixedlayout.c b/gtk/gtkfixedlayout.c
index 86de960f42..e5c90f15ab 100644
--- a/gtk/gtkfixedlayout.c
+++ b/gtk/gtkfixedlayout.c
@@ -182,7 +182,8 @@ gtk_fixed_layout_child_set_transform (GtkFixedLayoutChild *child,
 
   g_return_if_fail (GTK_IS_FIXED_LAYOUT_CHILD (child));
 
-  child->transform = gsk_transform_transform (child->transform, transform);
+  gsk_transform_unref (child->transform);
+  child->transform = gsk_transform_ref (transform);
 
   layout = gtk_layout_child_get_layout_manager (GTK_LAYOUT_CHILD (child));
   gtk_layout_manager_layout_changed (layout);


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