gtk-demo: Update the ::prepare handler

This commit is contained in:
Matthias Clasen 2020-01-07 14:48:09 -05:00
parent 8a521accbc
commit 6b7c5174ed

View File

@ -143,17 +143,13 @@ get_texture (GValue *value,
g_value_set_object (value, paintable);
}
static void
static GdkContentProvider *
prepare_drag (GtkDragSource *source,
double x,
double y,
GtkWidget *image)
{
GdkContentProvider *content;
content = gdk_content_provider_new_with_callback (GDK_TYPE_TEXTURE, get_texture, image);
gtk_drag_source_set_content (source, content);
g_object_unref (content);
return gdk_content_provider_new_with_callback (GDK_TYPE_TEXTURE, get_texture, image);
}
static void