[gtk/layout-manager-transform-demo: 6/9] Fix picking




commit 78efdb8e6c2e6292378d095007546071c19c351e
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Sep 1 23:23:42 2020 -0400

    Fix picking
    
    My previous change here was too hasty - this code is not
    actually transforming points - it is just a convoluted
    way to transform the z axis from child coordinates to
    the parent.

 gtk/gtkwidget.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ccc085256c..18038fd1a4 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -9370,8 +9370,8 @@ gtk_widget_do_pick (GtkWidget    *widget,
               gsk_transform_unref (transform);
               graphene_point3d_init (&p0, x, y, 0);
               graphene_point3d_init (&p1, x, y, 1);
-              gsk_matrix_transform_point3d (&inv, &p0, &p0);
-              gsk_matrix_transform_point3d (&inv, &p1, &p1);
+              graphene_matrix_transform_point3d (&inv, &p0, &p0);
+              graphene_matrix_transform_point3d (&inv, &p1, &p1);
               if (fabs (p0.z - p1.z) < 1.f / 4096)
                 continue;
 


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