From 6dcc061a7946430428c82cdb2609aeb1956eafa8 Mon Sep 17 00:00:00 2001 From: xurui Date: Tue, 16 Jun 2026 20:25:37 +0800 Subject: [PATCH] drag: check dnd action and accepted on touch up Signed-off-by: xurui --- types/data_device/wlr_drag.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c index dbf30a321..df706ca35 100644 --- a/types/data_device/wlr_drag.c +++ b/types/data_device/wlr_drag.c @@ -290,7 +290,8 @@ static uint32_t drag_handle_touch_up(struct wlr_seat_touch_grab *grab, return 0; } - if (drag->focus_client) { + if (drag->focus_client && drag->source->current_dnd_action && + drag->source->accepted) { drag_drop(drag, time); } else if (drag->source->impl->dnd_finish) { // This will end the grab and free `drag`