Wayland only returns GDK_DRAG_CANCEL_ERROR to the "cancel" signal when DND ends
According to documentation [1], the "cancel"
signal should pass valid GdkDragCancelReason
. Under wayland dnd implementation it only returns GDK_DRAG_CANCEL_ERROR [2]. The Xorg implementation is more capable in this area.
The reason we need this is a tab detachment from the app (Firefox in this case) to create a new window by using drag and drop. Currently the code presumes that user cancelled the action because the GDK_DRAG_CANCEL_NO_TARGET was not delivered to the cancel
callback.
[1] https://developer.gnome.org/gdk3/stable/gdk3-Drag-and-Drop.html#GdkDragContext-cancel
[2] https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gdk/wayland/gdkselection-wayland.c#L923
Edited by Jan Horak