Use actual drop status

We have this information in the XDND protocol, so we don't have
to blindly assume that the drop succeeded.
This commit is contained in:
Matthias Clasen 2016-01-19 07:13:57 -05:00 committed by Carlos Garnacho
parent 40b28ac66a
commit cccaf1d16b

View File

@ -3080,11 +3080,13 @@ static gboolean
gdk_dnd_handle_drop_finished (GdkDragContext *context,
const GdkEventDND *event)
{
GdkX11DragContext *x11_context = GDK_X11_DRAG_CONTEXT (context);
if (context != event->context)
return FALSE;
g_signal_emit_by_name (context, "dnd-finished");
gdk_drag_drop_done (context, TRUE);
gdk_drag_drop_done (context, !x11_context->drop_failed);
return TRUE;
}