Skip to content

fix(wayland): copy via wl-copy so the image survives closing SkitchG - #24

Merged
cgillinger merged 1 commit into
mainfrom
wayland-clipboard
Oct 29, 2026
Merged

cgillinger merged 1 commit into
mainfrom
wayland-clipboard

Conversation

@cgillinger

Copy link
Copy Markdown
Owner

On KDE Wayland, Copy looked unreliable:

  • Qt's clipboard data lives in the SkitchG process. Copy → close → paste lost the image (Klipper put back older text).
  • KWin silently drops a selection whose input serial is older than the current owner's, so Copy could fail while the status bar still said "copied".

On Wayland, Copy now pipes the PNG to wl-copy, which serves it from its own process. Without wl-copy (or on X11/Windows) Qt's clipboard is used as before. README clipboard note updated.

Verified: copy after another app took the clipboard → image/png on the clipboard; still present after SkitchG exits. Smoke tests pass.

🤖 Generated with Claude Code

Qt's Wayland clipboard dies with the process (Klipper restores older
text instead of keeping the image), and KWin silently drops a selection
whose input serial is older than the current owner's. Handing the PNG
to wl-copy fixes both; Qt's clipboard remains the fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cgillinger
cgillinger merged commit 346c908 into main Oct 29, 2026
2 checks passed
@cgillinger
cgillinger deleted the wayland-clipboard branch October 29, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant