diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-02-14 18:15:38 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-02-21 00:39:41 -0500 |
commit | 7e80c39aeea50bb2054ee36c874a00cb16fcd120 (patch) | |
tree | 686f933bc3c91194013786b6307c6beaadd4ad8a /gdk/gdkdrop.c | |
parent | 7f2564aabeab831f2b59895bb6c2a8e9b935b6a7 (diff) | |
download | gtk+-7e80c39aeea50bb2054ee36c874a00cb16fcd120.tar.gz |
Remove root coords from the GdkDrop api
Diffstat (limited to 'gdk/gdkdrop.c')
-rw-r--r-- | gdk/gdkdrop.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/gdk/gdkdrop.c b/gdk/gdkdrop.c index d4605aa8da..2f27bccfd5 100644 --- a/gdk/gdkdrop.c +++ b/gdk/gdkdrop.c @@ -983,26 +983,21 @@ gdk_drop_emit_enter_event (GdkDrop *self, void gdk_drop_emit_motion_event (GdkDrop *self, gboolean dont_queue, - double x_root, - double y_root, + double x, + double y, guint32 time) { GdkDropPrivate *priv = gdk_drop_get_instance_private (self); GdkEvent *event; - int x, y; g_warn_if_fail (priv->entered); - gdk_surface_get_origin (priv->surface, &x, &y); - event = gdk_event_new (GDK_DRAG_MOTION); event->any.surface = g_object_ref (priv->surface); event->dnd.drop = g_object_ref (self); event->dnd.time = time; - event->dnd.x_root = x_root; - event->dnd.y_root = y_root; - event->dnd.x = x_root - x; - event->dnd.y = y_root - y; + event->dnd.x = x; + event->dnd.y = y; gdk_event_set_device (event, priv->device); gdk_drop_do_emit_event (event, dont_queue); @@ -1032,27 +1027,22 @@ gdk_drop_emit_leave_event (GdkDrop *self, void gdk_drop_emit_drop_event (GdkDrop *self, gboolean dont_queue, - double x_root, - double y_root, + double x, + double y, guint32 time) { GdkDropPrivate *priv = gdk_drop_get_instance_private (self); GdkEvent *event; - int x, y; g_warn_if_fail (priv->entered); g_warn_if_fail (priv->state == GDK_DROP_STATE_NONE); - gdk_surface_get_origin (priv->surface, &x, &y); - event = gdk_event_new (GDK_DROP_START); event->any.surface = g_object_ref (priv->surface); event->dnd.drop = g_object_ref (self); event->dnd.time = time; - event->dnd.x_root = x_root; - event->dnd.y_root = y_root; - event->dnd.x = x_root - x; - event->dnd.y = y_root - y; + event->dnd.x = x; + event->dnd.y = y; gdk_event_set_device (event, priv->device); priv->state = GDK_DROP_STATE_DROPPING; |