colorbutton: Use gtk_widget_add_controller for drag source
authorMatthias Clasen <mclasen@redhat.com>
Tue, 7 Jan 2020 06:07:24 +0000 (01:07 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 8 Jan 2020 23:48:21 +0000 (18:48 -0500)
gtk/gtkcolorbutton.c

index a951958c484a45a75f57df217de4ce9f420d4113..5df2fad3dfb05969684f11dde58b53d1eb86eb0d 100644 (file)
@@ -338,8 +338,7 @@ gtk_color_button_init (GtkColorButton *button)
   gtk_drag_source_set_content (source, content);
   g_object_unref (content);
   g_signal_connect (source, "drag-begin", G_CALLBACK (gtk_color_button_drag_begin), button);
-
-  gtk_drag_source_attach (source, priv->button, GDK_BUTTON1_MASK|GDK_BUTTON3_MASK);
+  gtk_widget_add_controller (priv->button, GTK_EVENT_CONTROLLER (source));
 
   context = gtk_widget_get_style_context (GTK_WIDGET (priv->button));
   gtk_style_context_add_class (context, "color");