summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-12-31 17:01:09 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-03 13:02:16 -0500
commitcd7b278e775af1c5c99fdc4b8fb27123c2c141ba (patch)
tree6921dde5699f00e14eae536f59806c20853eb518
parent9809a313db8fd8b3ce7ed8b4f212b933814a16e3 (diff)
downloadgtk+-cd7b278e775af1c5c99fdc4b8fb27123c2c141ba.tar.gz
dnd: Patch up gtk_drag_get_source_widget
This is temporary until gtk_drag_dest_set users have been ported over.
-rw-r--r--gtk/gtkdnd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 17dbb49876..09c6863fe0 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -319,14 +319,19 @@ GtkWidget *
gtk_drag_get_source_widget (GdkDrag *drag)
{
GtkDragSourceInfo *info;
+ GtkDragSource *source;
g_return_val_if_fail (GDK_IS_DRAG (drag), NULL);
info = gtk_drag_get_source_info (drag, FALSE);
- if (info == NULL)
- return NULL;
+ if (info)
+ return info->widget;
+
+ source = gtk_drag_get_source (drag);
+ if (source)
+ return gtk_drag_source_get_origin (source);
- return info->widget;
+ return NULL;
}
/**