[gtk+] Use actual drop status
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Use actual drop status
- Date: Tue, 19 Jan 2016 13:30:52 +0000 (UTC)
commit cccaf1d16bb42f343d4ba5b6ea2f81d5d9555d92
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 19 07:13:57 2016 -0500
Use actual drop status
We have this information in the XDND protocol, so we don't have
to blindly assume that the drop succeeded.
gdk/x11/gdkdnd-x11.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index b8468d3..56f3372 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]