dragicon: No events, please
authorMatthias Clasen <mclasen@redhat.com>
Mon, 13 Dec 2021 02:28:34 +0000 (21:28 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 13 Dec 2021 02:28:34 +0000 (21:28 -0500)
We run into trouble on X11 if the widgets
in the drag icon have drop targets attached.
Prevent this by suppressing event delivery
to drag icons outright.

gtk/gtkdragicon.c

index 43c8940e03c0f4a1931a3f04b3c198fd281bbed3..e4deb8adf71a674e4fbbb1b6d49f2eb030547951 100644 (file)
@@ -386,6 +386,7 @@ gtk_drag_icon_class_init (GtkDragIconClass *klass)
 static void
 gtk_drag_icon_init (GtkDragIcon *self)
 {
+  gtk_widget_set_can_target (GTK_WIDGET (self), FALSE);
 }
 
 /**
@@ -568,7 +569,7 @@ gtk_drag_icon_create_widget_for_value (const GValue *value)
       node = gsk_value_get_render_node (value);
       if (node == NULL)
         return NULL;
-      
+
       gsk_render_node_get_bounds (node, &bounds);
       paintable = gtk_render_node_paintable_new (node, &bounds);
       image = gtk_image_new_from_paintable (paintable);