From 3b4bfba37d8885ebed92e3c154287961e7c60968 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 7 Dec 2015 21:53:38 -0500 Subject: [PATCH] wayland: Add a dummy implementation of gdk_drag_context_set_hotspot This just records the hotspot coordinates. Still to do: apply the hotspot when updating the drag window. --- gdk/wayland/gdkdnd-wayland.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c index 0ee59ab5ba..f20a0e7ab0 100644 --- a/gdk/wayland/gdkdnd-wayland.c +++ b/gdk/wayland/gdkdnd-wayland.c @@ -48,6 +48,8 @@ struct _GdkWaylandDragContext uint32_t serial; gdouble x; gdouble y; + gint hot_x; + gint hot_y; }; struct _GdkWaylandDragContextClass @@ -299,6 +301,15 @@ gdk_wayland_drag_context_get_drag_window (GdkDragContext *context) return GDK_WAYLAND_DRAG_CONTEXT (context)->dnd_window; } +static void +gdk_wayland_drag_context_set_hotspot (GdkDragContext *context, + gint hot_x, + gint hot_y) +{ + GDK_WAYLAND_DRAG_CONTEXT (context)->hot_x = hot_x; + GDK_WAYLAND_DRAG_CONTEXT (context)->hot_y = hot_y; +} + static void gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass) { @@ -317,6 +328,7 @@ gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass) context_class->drop_status = gdk_wayland_drag_context_drop_status; context_class->get_selection = gdk_wayland_drag_context_get_selection; context_class->get_drag_window = gdk_wayland_drag_context_get_drag_window; + context_class->set_hotspot = gdk_wayland_drag_context_set_hotspot; } GdkDragProtocol