[gtk+] dnd: Make dest side safe against destroy
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] dnd: Make dest side safe against destroy
- Date: Fri, 30 Jan 2015 15:14:14 +0000 (UTC)
commit f2cfe9ed74ae222fd0f61f09e85972cbc3ad9917
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jan 29 23:45:28 2015 -0500
dnd: Make dest side safe against destroy
Use a weak pointer to clean up when the current drag destination
gets destroyed.
gtk/gtkdnd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 90e53bf..8ee832f 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1926,6 +1926,7 @@ gtk_drag_find_widget (GtkWidget *widget,
}
info->widget = widget;
+ g_object_add_weak_pointer (G_OBJECT (widget), (gpointer *) &info->widget);
}
}
@@ -3577,7 +3578,6 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
case GDK_DRAG_STATUS:
{
GdkCursor *cursor;
-
if (info->proxy_dest)
{
if (!event->dnd.send_event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]