From 0d4d4e9a8cce34d42e0eb2596288ba16ddf95411 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 18 Feb 2020 02:58:58 +0100 Subject: [PATCH] colorbutton: Fix drag source By running it in the capture phase, it will not be starved for events by the button's click source and make drags actually start a color drag operation. --- gtk/gtkcolorbutton.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 86c81830f5..9c951d21ae 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -328,6 +328,7 @@ gtk_color_button_init (GtkColorButton *button) source = gtk_drag_source_new (); g_signal_connect (source, "prepare", G_CALLBACK (gtk_color_button_drag_prepare), button); g_signal_connect (source, "drag-begin", G_CALLBACK (gtk_color_button_drag_begin), button); + gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (source), GTK_PHASE_CAPTURE); gtk_widget_add_controller (priv->button, GTK_EVENT_CONTROLLER (source)); gtk_widget_add_css_class (priv->button, "color");