mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-20 05:50:11 +00:00
wayland: Fix some dnd corner case
We must call gdk_drag_drop_done() when the drag ends, successfully or not. Without this, we get an unwarranted emission of ::cancel after a successful drop. Since only the first call to gdk_drag_drop_done() is taking effect, it is safe to call as a fallback, after emitting ::dnd-finished. If the application connects to that signal and calls gdk_drag_drop_done() itself, its call will take precedence. This matches what the X11 implementation does.
This commit is contained in:
parent
c8ad4d5deb
commit
4df9314039
@ -163,6 +163,7 @@ gdk_wayland_drag_cancel (GdkDrag *drag,
|
||||
GdkDragCancelReason reason)
|
||||
{
|
||||
gdk_drag_set_cursor (drag, NULL);
|
||||
gdk_drag_drop_done (drag, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -290,6 +291,7 @@ data_source_dnd_finished (void *data,
|
||||
GdkDrag *drag = data;
|
||||
|
||||
g_signal_emit_by_name (drag, "dnd-finished");
|
||||
gdk_drag_drop_done (drag, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user