[gtk+] gtkdnd: Set the icon helper from the drag site onto the context



commit a6cafa1edb536d4f59b33ece6090e33f54f41b1b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Mar 28 14:16:45 2015 +0100

    gtkdnd: Set the icon helper from the drag site onto the context
    
    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 |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 04f3d8e..77ae6d7 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -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.


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