[gtk/dnd-gestures-2: 111/175] colorbutton: Use gtk_widget_add_controller for drag source



commit e8698f706fa05ef8d9189578775aa841ec2b9764
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 7 01:07:24 2020 -0500

    colorbutton: Use gtk_widget_add_controller for drag source

 gtk/gtkcolorbutton.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index a951958c48..5df2fad3df 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -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");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]