From 6f017eb4c18ea53cbc2782df10e078f5b939e87c Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Fri, 16 Oct 2026 13:26:20 +0300 Subject: End every drag with one event A drag that dropped on no YASL surface, such as one dropped on the desktop or canceled, ended unheard: the public drag start set no end listener. An application then waited for the drag's end forever. The public layer now listens for the end. When no surface got the drop, the origin gets DRAG with the new action YASL_DROP_CANCEL. Co-Authored-By: Claude Opus 5.5 --- src/common/events.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common/events.c') diff --git a/src/common/events.c b/src/common/events.c index c310f06..a9557c9 100644 --- a/src/common/events.c +++ b/src/common/events.c @@ -304,6 +304,8 @@ void yasl_private_surface_notify_state(struct yasl_surface *s, uint32_t flags) void yasl_private_surface_notify_drag(struct yasl_surface *s, enum yasl_private_drag_event action, struct yasl_private_vector2i pos) { struct yasl_private_event event = {.type = YASL_PRIVATE_EVENT_DRAG, .surface = s, .drag = {action, pos}}; + if (action == YASL_PRIVATE_DRAG_DROP) + s->display->drag_dropped = true; yasl_private_events_push(s->display, s, &event); } -- cgit v1.2.3