From 1a5dece09c4b97a9d8d051dbceb08de1a211ba01 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 7 Jan 2020 01:06:39 -0500 Subject: [PATCH] gtk-demo: Use gtk_widget_add_controller for drag source --- demos/gtk-demo/clipboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c index 3da096060e..303ff313f6 100644 --- a/demos/gtk-demo/clipboard.c +++ b/demos/gtk-demo/clipboard.c @@ -344,9 +344,9 @@ do_clipboard (GtkWidget *do_widget) /* make image a drag source */ source = gtk_drag_source_new (); - gtk_drag_source_attach (source, image, GDK_BUTTON1_MASK); g_signal_connect (source, "prepare", G_CALLBACK (prepare_drag), NULL); g_signal_connect (source, "drag-begin", G_CALLBACK (drag_begin), image); + gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source)); /* accept drops on image */ formats = gdk_content_formats_new (NULL, 0); @@ -378,7 +378,7 @@ do_clipboard (GtkWidget *do_widget) source = gtk_drag_source_new (); g_signal_connect (source, "prepare", G_CALLBACK (prepare_drag), NULL); g_signal_connect (source, "drag-begin", G_CALLBACK (drag_begin), image); - gtk_drag_source_attach (source, image, GDK_BUTTON1_MASK); + gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source)); /* accept drops on image */ formats = gdk_content_formats_new (NULL, 0);