[gtk/dnd-gestures-2: 98/100] dragsource: Use public drag icon api



commit 6426402fda2b5caa648b555bd0bf8b1a83b8fea0
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 6 16:00:17 2020 -0500

    dragsource: Use public drag icon api

 gtk/gtkdragsource.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c
index 68a0a344df..67e09f2fd0 100644
--- a/gtk/gtkdragsource.c
+++ b/gtk/gtkdragsource.c
@@ -37,6 +37,8 @@
 #include "gtkdragiconprivate.h"
 #include "gtkprivate.h"
 #include "gtkmarshalers.h"
+#include "gtkicontheme.h"
+#include "gtkpicture.h"
 #include "gtksettingsprivate.h"
 
 /**
@@ -437,14 +439,12 @@ gtk_drag_source_drag_begin (GtkDragSource *source,
     }
 
   gdk_drag_set_hotspot (source->drag, source->hot_x, source->hot_y);
-  source->icon_window = gtk_drag_icon_new ();
+  source->icon_window = gtk_drag_icon_new_for_drag (source->drag);
   g_object_ref_sink (source->icon_window);
-  gtk_drag_icon_set_surface (GTK_DRAG_ICON (source->icon_window),
-                             gdk_drag_get_drag_surface (source->drag));
 
   icon = gtk_picture_new_for_paintable (source->paintable);
   gtk_picture_set_can_shrink (GTK_PICTURE (icon), FALSE);
-  gtk_drag_icon_set_widget (GTK_DRAG_ICON (source->icon_window), icon);
+  gtk_container_add (GTK_CONTAINER (source->icon_window), icon);
 
   gtk_widget_show (source->icon_window);
 


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