diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 21:23:03 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 21:23:03 +0300 |
| commit | dd1775a9927922c14f8679ccbc4d3ca8d5917e20 (patch) | |
| tree | 3acc442bb4a3470364b74aa82ff67cb84d555c45 /src/platform/wayland/pointer.c | |
| parent | ecb81aeea4c0c880b3a60a0dc8418c4bf2a7cf85 (diff) | |
public api refactor
Diffstat (limited to 'src/platform/wayland/pointer.c')
| -rw-r--r-- | src/platform/wayland/pointer.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/platform/wayland/pointer.c b/src/platform/wayland/pointer.c index cdc5780..da666da 100644 --- a/src/platform/wayland/pointer.c +++ b/src/platform/wayland/pointer.c @@ -1034,13 +1034,19 @@ static const struct zwp_tablet_seat_v2_listener tablet_seat_listener = { }; static void clipboard_received(const char *text, size_t len, bool uri_list, - struct wl_surface *on, void *ud) + struct wl_surface *on, uint64_t request_id, + enum yasl_transfer_status status, void *ud) { (void)ud; struct wayland_surface *w = on ? (struct wayland_surface *)wl_surface_get_user_data(on) : NULL; if (uri_list) w = surface_root(w); - if (!w || w->closed) return; + if (!w || w->closed || w->destroyed) return; + if (!uri_list) { + yasl_surface_complete_paste(&w->base, request_id, status, text, len); + return; + } + if (status != YASL_TRANSFER_OK) return; struct yasl_event ev = { .surface = &w->base, .type = uri_list ? YASL_EVENT_DROP : YASL_EVENT_PASTE, |
