dragicon: Make color icons work in X11
authorMatthias Clasen <mclasen@redhat.com>
Mon, 13 Dec 2021 02:01:40 +0000 (21:01 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 13 Dec 2021 03:09:28 +0000 (22:09 -0500)
We need to disable the DND support in
GtkColorSwatch completely for this to work
in X11.

gtk/gtkdragicon.c

index 02c20d42e5649e03604d7a0f2d6f95bd00238f3c..dfcd6768c60f5ce111ee70326c1eaf1173ee15cc 100644 (file)
@@ -546,6 +546,8 @@ gtk_drag_icon_create_widget_for_value (const GValue *value)
       GtkWidget *swatch;
 
       swatch = gtk_color_swatch_new ();
+      gtk_color_swatch_set_can_drag (GTK_COLOR_SWATCH (swatch), FALSE);
+      gtk_color_swatch_set_can_drop (GTK_COLOR_SWATCH (swatch), FALSE);
       gtk_color_swatch_set_rgba (GTK_COLOR_SWATCH (swatch), g_value_get_boxed (value));
 
       return swatch;