mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-11 16:31:07 +00:00
The paste handler read the system clipboard synchronously (2 s timeout) even though the paste event already carries that text, and discarded the read's result. On the desktop, the clipboard bridge delivers `event_text` that it read while the window thread was free; re-reading from the paste handler blocks that same window thread - and when the app itself owns the clipboard (a self-paste), its own data source can only be served by that very thread, so every self-paste froze the window for the full 2 s read timeout on Linux/Wayland. Prefer the event's text and only fall back to the synchronous read when the platform handed over none (chords, image-only clipboard, context-menu paste). A regression test pins that a paste event carrying text never triggers the synchronous read.