Write every clipboard type a program gives, each served its own bytes #27
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:map
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
jeff/harrier#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #23
A 5522 write arrives with every type the program wrote, but
Session.clipboardWritekeeps only the first text type. If there is none, it replies ENOSYS. The Wayland data source offers only the text type names and serves its one buffer, whichever type is asked for, with a blocking write on the window thread. Sokitten clipboardcopying an image puts nothing on the clipboard.What done looks like
text/plain(or another text type) is among them, it also offers the usual text aliases (text/plain;charset=utf-8,UTF8_STRING,TEXT,STRING).sendis served the bytes of the type it asked for, written a bounded chunk a turn without blocking, from the main loop's poll, inClipboardTransfers(see #26), rather than a blocking write on the window thread.wl-paste -t image/png. A write with both text and an image serves each its own.Not here: replying "done" before the user has answered a write that asks first. That's its own issue.
Done in
9a9ae8b. In the sway VM test, a program writes 1 MiB asimage/pngplus "hello" astext/plainwith 5522.wl-paste -lthen offersimage/png text/plain;charset=utf-8 text/plain UTF8_STRING TEXT STRING,-t text/plaingives "hello", and-t image/pnggives the image byte for byte. The platform keeps what it offers in a reference-countedOffered, andClipboardTransferswrites each request without blocking. One test detail: the compositor accepts a selection only from a client that has had input, so the test presses a key before the program writes.