Repository navigation
Test the image clipboard against real desktops, and stop xclip holding the app's output [patch] - #719
Merged
Merged
Conversation
…g the app's output [patch] RealClipboardTests runs the clipboard against each desktop's own, with another program on the other end, opt-in through IMGUI_REAL_CLIPBOARD. A new Real Clipboard workflow runs it on X11, sway, GNOME, KDE, Windows and macOS. They found one bug: xclip leaves a child serving the clipboard, and that child kept the application's inherited standard output and error. A script or launcher reading the application's output waited until something else was copied. Every tool now gets pipes of its own, a writer's are closed straight away, and a tool's complaints no longer reach the application's standard error. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YT3VyWhYEb76KESkhrtitH
|
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Requested by Matt · project thread
What
RealClipboardTests(7 tests) runsImageClipboard.ForThisPlatform()against the desktop's real clipboard, with another program on the other end: our write read back, another program reading our PNG, our reading another program's PNG, a bitmap-only offer (BMP on Linux, DIB via Windows FormsSetImage, TIFF on macOS), text giving "no image", and the write returning promptly while the image survives. The tests are opt-in throughIMGUI_REAL_CLIPBOARD=1because they overwrite the clipboard. Without it they're skipped.Bug found and fixed
xclip -inleaves a child serving the clipboard, and that child kept the app's inherited stdout and stderr. A launcher or script reading the app's output stayed blocked until something else was copied.SystemClipboardProcessesnow always redirects both streams and closes a writer's straight after start. A reader's stderr is drained, so tool complaints such as "Can't open display" no longer show up in the app's stderr.TheToolLeftServingTheClipboard_HoldsNoneOfThisProcesssOutputfails without the fix.Verified locally
All 7 pass on X11, sway, GNOME (with wl-clipboard, and with the XWayland/xclip fallback in both directions) and KDE 5.27. The full ImGui.App.Tests suite passes (672 passed, 11 skipped). Windows and macOS are covered by this PR's workflow run.
Generated by Claude Code