gtk-demo/dnd: Fix up drag_cancel

This needs to return a boolean, also it should not call end because
that will be called anyway by Gtk+ after cancel, and this was causing
warnings due to the opacity being unset with no dragged widget set.
This commit is contained in:
Alexander Larsson
2020-05-14 10:45:38 +02:00
parent 4ce65f019e
commit 32f58e6c0b

View File

@@ -53,12 +53,12 @@ drag_end (GtkDragSource *source,
gtk_widget_set_opacity (item, 1.0);
}
static void
static gboolean
drag_cancel (GtkDragSource *source,
GdkDrag *drag,
GdkDragCancelReason reason)
{
drag_end (source, drag);
return FALSE;
}
typedef struct {