diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-16 13:26:20 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-16 13:26:20 +0300 |
| commit | 6f017eb4c18ea53cbc2782df10e078f5b939e87c (patch) | |
| tree | 412b145bf1c9adac770a94e5aba2cd34baf3d742 /src/common/events.c | |
| parent | 12d2735115528d741ebf47b6738c88b7c182b85b (diff) | |
End every drag with one eventone-loop
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 <noreply@anthropic.com>
Diffstat (limited to 'src/common/events.c')
| -rw-r--r-- | src/common/events.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |
