[gtk/wip/baedert/transforms5: 247/272] widget: Use translate_coordinates in pick()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/transforms5: 247/272] widget: Use translate_coordinates in pick()
- Date: Fri, 9 Nov 2018 08:56:15 +0000 (UTC)
commit c0633b2d147ab82c648222baa38baf96e49639f8
Author: Timm Bäder <mail baedert org>
Date: Sat Jul 28 12:33:04 2018 +0200
widget: Use translate_coordinates in pick()
In case converting the coordinate into the child coordinate space
consists of more than just a translation.
gtk/gtkwidget.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index bc53824b75..afa1a86c29 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -818,11 +818,12 @@ gtk_widget_real_pick (GtkWidget *widget,
child = _gtk_widget_get_prev_sibling (child))
{
GtkWidget *picked;
- int dx, dy;
+ double dx, dy;
- gtk_widget_get_origin_relative_to_parent (child, &dx, &dy);
+ gtk_widget_translate_coordinatesf (widget, child, x, y, &dx, &dy);
+
+ picked = gtk_widget_pick (child, dx, dy);
- picked = gtk_widget_pick (child, x - dx, y - dy);
if (picked)
return picked;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]