photocraft/crates/ui-egui
Brandon Thomas 65bc1645b8 fix(ui): read the OS clipboard only on an explicit paste
Follow-up to #102. Drop the 4 Hz background mirroring of the OS clipboard
in logic(): reading the whole system clipboard (possibly a large image)
without user action is a privacy problem (macOS warns about it) and wastes
CPU. Edit > Paste / Paste in Place are now enabled when the session
clipboard has content or an OS clipboard service exists (no read); the menu,
shortcut, palette and control paths import the OS image once, on the paste
itself, and keep #102's centring of external images. An empty or non-image
clipboard makes Paste a no-op with a status message instead of an error.

Tests: external_clipboard_enables_and_centres_paste adapted (enabled without
a read, exactly one read per paste, centred), plus an empty-clipboard no-op
test and idle_frames_never_read_the_os_clipboard (20 full app frames, zero
reads).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:03:08 -04:00
..
examples Adjustment dialogs: GPU live preview through a clipped adjustment layer (#77) (#85) 2026-10-04 23:31:05 -04:00
src fix(ui): read the OS clipboard only on an explicit paste 2026-10-05 01:03:08 -04:00
tests Adjustment dialogs: GPU live preview through a clipped adjustment layer (#77) (#85) 2026-10-04 23:31:05 -04:00
Cargo.toml security: constrain automation filesystem access (#72) 2026-10-04 16:35:06 -04:00