[gtk+/gtk-3-14] Bug 745957 - GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] Bug 745957 - GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel
- Date: Sun, 31 May 2015 18:59:53 +0000 (UTC)
commit 4983d437e3c740b66d98dea857e7c0984a76b53c
Author: John Ralls <jralls ceridwen us>
Date: Sun May 31 11:52:35 2015 -0700
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.
gtk/gtkdnd-quartz.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index 9967ef7..f613e2e 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
@@ -1365,6 +1367,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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]