From 6b7c5174ed7275cc00e5ca099820a25cd9081f57 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 7 Jan 2020 14:48:09 -0500 Subject: [PATCH] gtk-demo: Update the ::prepare handler --- demos/gtk-demo/clipboard.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c index 578bc6d7bf..5cad0626de 100644 --- a/demos/gtk-demo/clipboard.c +++ b/demos/gtk-demo/clipboard.c @@ -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