diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-17 17:08:01 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-17 17:17:31 -0400 |
commit | 75d931098620119e744af82d32b850e367a46701 (patch) | |
tree | 735a9eddeddefbe922a8c0df5cdc6ce45dbbf5ea /gtk/gtkdragsource.c | |
parent | 93d4253c93c2817c1d9c27ed2c702ed400308186 (diff) | |
download | gtk+-75d931098620119e744af82d32b850e367a46701.tar.gz |
Change coordinate translation apis to take doubles
Change gtk_widget_translate_coordinates and
gtk_native_get_surface_transform to operate
on doubles. Update all callers.
Diffstat (limited to 'gtk/gtkdragsource.c')
-rw-r--r-- | gtk/gtkdragsource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c index 779fbefb81..3d45cec163 100644 --- a/gtk/gtkdragsource.c +++ b/gtk/gtkdragsource.c @@ -490,7 +490,7 @@ gtk_drag_source_drag_begin (GtkDragSource *source) { GtkWidget *widget; GdkDevice *device; - int x, y; + double x, y; GtkNative *native; GdkSurface *surface; double px, py; @@ -509,8 +509,8 @@ gtk_drag_source_drag_begin (GtkDragSource *source) gtk_widget_translate_coordinates (widget, GTK_WIDGET (native), source->start_x, source->start_y, &x, &y); gdk_surface_get_device_position (surface, device, &px, &py, NULL); - dx = round (px) - x; - dy = round (py) - y; + dx = round (px - x); + dy = round (py - y); g_signal_emit (source, signals[PREPARE], 0, source->start_x, source->start_y, &content); if (!content) |