forked from AuroraMiddleware/gtk
dnd: Make dest side safe against destroy
Use a weak pointer to clean up when the current drag destination gets destroyed.
This commit is contained in:
parent
90d42ef5cc
commit
650c25e06c
@ -1928,6 +1928,7 @@ gtk_drag_find_widget (GtkWidget *widget,
|
||||
}
|
||||
|
||||
info->widget = widget;
|
||||
g_object_add_weak_pointer (G_OBJECT (widget), (gpointer *) &info->widget);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3569,7 +3570,6 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
|
||||
case GDK_DRAG_STATUS:
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
if (info->proxy_dest)
|
||||
{
|
||||
if (!event->dnd.send_event)
|
||||
|
Loading…
Reference in New Issue
Block a user