colorbutton: Use gtk_widget_add_controller for drag source

This commit is contained in:
Matthias Clasen 2020-01-07 01:07:24 -05:00
parent bf98ebcb12
commit ceca2f9202

View 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");