gdkdrag/x11: Issue XdndLeave on cancellation
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 16 Jan 2020 14:03:24 +0000 (15:03 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 16 Jan 2020 14:03:24 +0000 (15:03 +0100)
According to XDND "The XdndLeave message cancels the session.",
issue one when cancelling a drag, so the dest side has an opportunity
to forget about the GdkDrop.

gdk/x11/gdkdrag-x11.c

index 87535b24ef88af69bf28520e40519bc5c80a047c..ed78c284ba1298c553f04f2eaf7dae7dd692c20e 100644 (file)
@@ -2141,6 +2141,7 @@ static void
 gdk_x11_drag_cancel (GdkDrag             *drag,
                      GdkDragCancelReason  reason)
 {
+  gdk_drag_do_leave (GDK_X11_DRAG (drag));
   drag_ungrab (drag);
   gdk_drag_drop_done (drag, FALSE);
 }