drag: check dnd action and accepted on touch up

Signed-off-by: xurui <xurui@kylinos.cn>
This commit is contained in:
xurui 2026-06-16 20:25:37 +08:00 committed by Simon Ser
parent c3f7587068
commit 6dcc061a79

View file

@ -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`