From 1b140e8cb9f04954f9daca903f6c6b9d6275de3b Mon Sep 17 00:00:00 2001 From: msizanoen1 Date: Tue, 11 Apr 2023 12:28:46 +0700 Subject: [PATCH] wayland/data-device: Clear data source when cancelling drag with ESC This ensures a consistent code path with other cases where the drag operation might be cancelled. Part-of: --- src/wayland/meta-wayland-data-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index 054bb44ab..7d808c65e 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -522,7 +522,9 @@ keyboard_drag_grab_key (MetaWaylandKeyboardGrab *grab, MetaWaylandDragGrab *drag_grab; drag_grab = wl_container_of (grab, drag_grab, keyboard_grab); - meta_wayland_data_source_cancel (drag_grab->drag_data_source); + meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, + NULL); + unset_selection_source (&drag_grab->seat->data_device, META_SELECTION_DND); meta_wayland_data_source_set_current_offer (drag_grab->drag_data_source, NULL); meta_dnd_actor_drag_finish (META_DND_ACTOR (drag_grab->feedback_actor),