testtoolbar: Use gtk_widget_add_controller for drag source

This commit is contained in:
Matthias Clasen 2020-01-07 01:13:51 -05:00
parent a5ca5eb865
commit c1029535ca

View File

@ -622,7 +622,7 @@ main (gint argc, gchar **argv)
gtk_drag_source_set_content (source, content);
gtk_drag_source_set_actions (source, GDK_ACTION_MOVE);
g_object_unref (content);
gtk_drag_source_attach (source, button, GDK_BUTTON1_MASK);
gtk_widget_add_controller (button, GTK_EVENT_CONTROLLER (source));
dest = gtk_drop_target_new (targets, GDK_ACTION_MOVE);
g_signal_connect (dest, "drag_motion", G_CALLBACK (toolbar_drag_motion), toolbar);
g_signal_connect (dest, "drag_leave", G_CALLBACK (toolbar_drag_leave), toolbar);