[gtk/fix-x11-drag-icons: 2/3] dragicon: Make color icons work in X11




commit 42fd499af4c0af999da2a579a4bcc03d2e666a27
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Dec 12 21:01:40 2021 -0500

    dragicon: Make color icons work in X11
    
    We need to disable the DND support in
    GtkColorSwatch completely for this to work
    in X11.

 gtk/gtkdragicon.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkdragicon.c b/gtk/gtkdragicon.c
index 02c20d42e5..dfcd6768c6 100644
--- a/gtk/gtkdragicon.c
+++ b/gtk/gtkdragicon.c
@@ -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;


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