[gtk/matthiasc/for-main: 3/3] dragicon: Make color icons work in X11




commit 531e9aeca0bc6be9527ca70e63e19a84d0022423
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 63ede6bc1e..b55fbfe417 100644
--- a/gtk/gtkdragicon.c
+++ b/gtk/gtkdragicon.c
@@ -545,6 +545,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]