gtkdnd: Set the icon helper from the drag site onto the context
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 28 Mar 2015 13:16:45 +0000 (14:16 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sun, 29 Mar 2015 20:21:19 +0000 (22:21 +0200)
If the icon happened to come from the drag site icon helper (ie. set through
gtk_drag_source_set_icon*), it would be referenced on the GtkDragInfo,
but not hooked into its context. This results on non visible drag windows,
until set_icon_helper() happened to be called on some path.

gtk/gtkdnd.c

index 04f3d8e4b9de96d86ae49b4d8cf6d5d119ff252d..77ae6d739e51f1dc84f9d13d3281ba3b7d76caf7 100644 (file)
@@ -2531,7 +2531,11 @@ gtk_drag_begin_internal (GtkWidget         *widget,
    * not have set one.
    */
   if (!info->icon_window && !info->icon_helper)
-    info->icon_helper = gtk_drag_source_site_get_icon_helper (site);
+    {
+      info->icon_helper = gtk_drag_source_site_get_icon_helper (site);
+      set_icon_helper (info->context, info->icon_helper,
+                       0, 0, TRUE);
+    }
 
   /* We need to composite the icon into the cursor, if we are
    * not using an icon window.