summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd-quartz.c
diff options
context:
space:
mode:
authorJohn Ralls <jralls@ceridwen.us>2015-05-31 11:52:35 -0700
committerJohn Ralls <jralls@ceridwen.us>2015-05-31 11:59:34 -0700
commit13c303fec532388ee920ec4a3bdbbc4064684665 (patch)
tree9d26fb18161fa17a7f92f2cf4050a0db83cc268d /gtk/gtkdnd-quartz.c
parentf5b245ff04ca65bbabc7fb8367cc75e9a4848840 (diff)
downloadgtk+-13c303fec532388ee920ec4a3bdbbc4064684665.tar.gz
Bug 745957 - GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel
Implement gtk_drag_cancel, made public in c160ba069 and 62616a71, in gtkdnd-quartz.c.
Diffstat (limited to 'gtk/gtkdnd-quartz.c')
-rw-r--r--gtk/gtkdnd-quartz.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index a9272984e4..8bc5ef3027 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -62,6 +62,8 @@ static void gtk_drag_source_site_destroy (gpointer data);
static GtkDragSourceInfo *gtk_drag_get_source_info (GdkDragContext *context,
gboolean create);
+static void gtk_drag_drop_finished (GtkDragSourceInfo *info);
+
extern GdkDragContext *gdk_quartz_drag_source_context (); /* gdk/quartz/gdkdnd-quartz.c */
struct _GtkDragSourceSite
@@ -1383,6 +1385,23 @@ gtk_drag_begin (GtkWidget *widget,
}
+/**
+ * gtk_drag_cancel:
+ * @context: a #GdkDragContext, as e.g. returned by gtk_drag_begin_with_coordinates()
+ *
+ */
+void
+gtk_drag_cancel (GdkDragContext *context)
+{
+ GtkDragSourceInfo *info;
+
+ g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
+
+ info = gtk_drag_get_source_info (context, FALSE);
+ if (info != NULL)
+ gtk_drag_drop_finished (info);
+}
+
static gboolean
gtk_drag_source_event_cb (GtkWidget *widget,
GdkEvent *event,