[gtk/matthiasc/for-master: 4/4] Fix picking




commit 30ab8b3ecac15e22436f6c38c1149e54f42f0d50
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]