summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsizanoen1 <msizanoen@qtmlabs.xyz>2023-04-11 12:28:46 +0700
committermsizanoen1 <qtmlabs@protonmail.com>2023-04-15 10:11:07 +0000
commit1b140e8cb9f04954f9daca903f6c6b9d6275de3b (patch)
tree719ca895bd8edeb43b612cbba5c7298220431f7f
parentce0d9ccb37c8bb9831c290cd636539a218a7fa18 (diff)
downloadmutter-1b140e8cb9f04954f9daca903f6c6b9d6275de3b.tar.gz
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2953>
-rw-r--r--src/wayland/meta-wayland-data-device.c4
1 files changed, 3 insertions, 1 deletions
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),