gdk: Add GdkDragCancelReason enum as argument to GdkDragContext::cancel

We should conform to a minimal set of reasons for the gtk side to emit
a better GtkDragResult than GTK_DRAG_RESULT_ERROR. This fixes the notebook
tab DnD feature, where we rely on GTK_DRAG_RESULT_NO_TARGET.

In the wayland side, unfortunately we can't honor either NO_TARGET nor
USER_CANCELLED, we don't know of the latter, so we could return false
positives on the former.

https://bugzilla.gnome.org/show_bug.cgi?id=761954
This commit is contained in:
Carlos Garnacho
2016-02-15 17:02:14 +01:00
parent 1ee3df5161
commit aad3135e4c
8 changed files with 59 additions and 19 deletions

View File

@ -441,7 +441,8 @@ gdk_wayland_drag_context_drop_performed (GdkDragContext *context,
}
static void
gdk_wayland_drag_context_cancel (GdkDragContext *context)
gdk_wayland_drag_context_cancel (GdkDragContext *context,
GdkDragCancelReason reason)
{
gdk_drag_context_set_cursor (context, NULL);
}