[gtk/dnd-gestures-2: 105/173] colorswatch: Use gtk_widget_add_controller for drag source



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

    colorswatch: Use gtk_widget_add_controller for drag source

 gtk/gtkcolorswatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c
index d693709669..96b6ea3447 100644
--- a/gtk/gtkcolorswatch.c
+++ b/gtk/gtkcolorswatch.c
@@ -607,7 +607,7 @@ gtk_color_swatch_set_rgba (GtkColorSwatch *swatch,
       g_object_unref (content);
       g_signal_connect (source, "drag-begin", G_CALLBACK (gtk_color_swatch_drag_begin), swatch);
 
-      gtk_drag_source_attach (source, GTK_WIDGET (swatch), GDK_BUTTON1_MASK | GDK_BUTTON3_MASK);
+      gtk_widget_add_controller (GTK_WIDGET (swatch), GTK_EVENT_CONTROLLER (source));
     }
 
   priv->has_color = TRUE;


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