Remember the clipboard's types, and list them without reading it #25

Closed
opened 2026-10-16 15:11:18 -05:00 by jeff · 1 comment
Owner

Part of #23

The Wayland platform collects every MIME type an offer advertises, but once the offer becomes the clipboard, .selection frees the list (offer_types). Only has_text survives. The 5522 listing (.) is answered by reading all of the clipboard's text and reporting text/plain. A keyboard paste event's listing is also only text/plain.

What done looks like

  • The clipboard offer keeps its advertised Clipboard types. Names that are not MIME types (UTF8_STRING, TEXT, STRING, TARGETS, anything without a /) are left out of what is reported.
  • When harrier owns the clipboard, the types are the ones it offers.
  • A listing read is answered from those types, without reading the contents, and still without a Confirmation.
  • A keyboard paste with kitty paste events on reports the same types in the event's listing.
  • The primary selection stays text only.
  • The sway VM test's listing assertion is updated: after wl-copy -t image/png, the listing names image/png.
  • ADR 0005's consequence saying mode 5522 is kept off is corrected.
Part of #23 The Wayland platform collects every MIME type an offer advertises, but once the offer becomes the clipboard, `.selection` frees the list (`offer_types`). Only `has_text` survives. The 5522 listing (`.`) is answered by reading all of the clipboard's text and reporting `text/plain`. A keyboard paste event's listing is also only `text/plain`. ## What done looks like - The clipboard offer keeps its advertised Clipboard types. Names that are not MIME types (`UTF8_STRING`, `TEXT`, `STRING`, `TARGETS`, anything without a `/`) are left out of what is reported. - When harrier owns the clipboard, the types are the ones it offers. - A listing read is answered from those types, without reading the contents, and still without a Confirmation. - A keyboard paste with kitty paste events on reports the same types in the event's listing. - The primary selection stays text only. - The sway VM test's listing assertion is updated: after `wl-copy -t image/png`, the listing names `image/png`. - ADR 0005's consequence saying mode 5522 is kept off is corrected.
jeff self-assigned this 2026-10-16 15:23:13 -05:00
jeff closed this issue 2026-10-16 15:45:31 -05:00
Author
Owner

Done in 0a4b0ba. The sway VM test now puts an image on the clipboard with wl-copy -t image/png and checks that the listing names image/png. Two things changed shape along the way. harrier's own clipboard lists as text/plain;charset=utf-8 text/plain, the types it offers. And a keyboard paste with paste events on now reads nothing at all: it lists the types, so a clipboard holding only an image is announced too, where before nothing happened.

Done in 0a4b0ba. The sway VM test now puts an image on the clipboard with `wl-copy -t image/png` and checks that the listing names `image/png`. Two things changed shape along the way. harrier's own clipboard lists as `text/plain;charset=utf-8 text/plain`, the types it offers. And a keyboard paste with paste events on now reads nothing at all: it lists the types, so a clipboard holding only an image is announced too, where before nothing happened.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
jeff/harrier#25
No description provided.