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/gtkplacessidebar.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/gtkplacessidebar.c')
-rw-r--r-- | gtk/gtkplacessidebar.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 0b43e070f3..07c2b5c31d 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -1686,8 +1686,6 @@ drag_motion_callback (GtkDropTarget *target, if (row != NULL) { - gint dest_y, dest_x; - g_object_get (row, "order-index", &row_index, NULL); g_object_get (sidebar->row_placeholder, "order-index", &row_placeholder_index, NULL); /* We order the bookmarks sections based on the bookmark index that we @@ -1703,9 +1701,9 @@ drag_motion_callback (GtkDropTarget *target, row_placeholder_index = row_index; gtk_widget_translate_coordinates (GTK_WIDGET (sidebar), GTK_WIDGET (row), x, y, - &dest_x, &dest_y); + &x, &y); - if (dest_y > sidebar->drag_row_height / 2 && row_index > 0) + if (y > sidebar->drag_row_height / 2 && row_index > 0) row_placeholder_index++; } else @@ -3459,8 +3457,8 @@ on_row_dragged (GtkGestureDrag *gesture, if (gtk_drag_check_threshold (GTK_WIDGET (row), 0, 0, x, y)) { - gdouble start_x, start_y; - gint drag_x, drag_y; + double start_x, start_y; + double drag_x, drag_y; GdkContentProvider *content; GdkSurface *surface; GdkDevice *device; |