wayland: Implement drag sources

The wl_data_source is retrieved from the selection object for the DnD
selection, and used to initiate a drag. When the drag is finished, a
button release or touch end event is synthesized to finish the DnD
operation after the compositor grab is gone.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
This commit is contained in:
Carlos Garnacho
2014-08-21 21:30:22 +02:00
parent 9b0b88d16b
commit 7b85a3417a
4 changed files with 203 additions and 6 deletions

View File

@ -109,6 +109,12 @@ void _gdk_wayland_drag_context_set_coords (GdkDragContext *context,
void gdk_wayland_drag_context_set_action (GdkDragContext *context,
GdkDragAction action);
GdkDragContext * gdk_wayland_drag_context_lookup_by_data_source (struct wl_data_source *source);
GdkDragContext * gdk_wayland_drag_context_lookup_by_source_window (GdkWindow *window);
struct wl_data_source * gdk_wayland_drag_context_get_data_source (GdkDragContext *context);
void gdk_wayland_drag_context_undo_grab (GdkDragContext *context);
void gdk_wayland_drop_context_update_targets (GdkDragContext *context);
void _gdk_wayland_display_create_window_impl (GdkDisplay *display,