all: depend on golang.design/x/x11 instead of the internal copy#122
Merged
Conversation
The pure-Go X11 wire codec was extracted to its own module, golang.design/x/x11 (v0.1.0), so it can be reused for other graphics work. Replace internal/x11wire with a dependency on the published package (imported under the x11wire alias to keep the backend code unchanged) and delete the internal copy. This adds a first-party golang.design module dependency; the package itself stays pure Go with no third-party or C dependencies, so the clipboard remains Cgo-free on Linux and the BSDs.
changkun
added a commit
that referenced
this pull request
Jun 7, 2026
#149) (#154) These shipped (darwin #117; linux/X11 #119/#120, BSD #121; Wayland #109-#116) but the specs still read 'Proposed'. Flip Status to Implemented and add an Outcome section to each documenting what shipped and where the implementation deviated from the design: - darwin: OS-thread pinning for autorelease pools (unanticipated); the suggested pure-Go TIFF unit test was not added; silent TIFF-transcode nil. - linux: internal/x11wire was extracted to the golang.design/x/x11 module (#122, now v0.2.0); one shared clipboard_x11.go for Linux+BSD; added sequence-matching/retry robustness. INCR/PRIMARY still unimplemented. - wayland: phase 6 folded into the wire core; PRIMARY not shipped; same-process self-read limitation for custom selections (verified cross-process); enumeration added later.
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.
Final step of the X11 work: extract the pure-Go X11 wire codec into its own
reusable module and depend on it, instead of keeping a private copy.
golang.design/x/x11(v0.1.0) — the minimal, dependency-free X11 wire-protocol client, promoted
from
internal/x11wire. Pure Go, no Cgo, nolibX11, no sockets(caller-supplied transport), unit-tested on any platform.
internal/x11wirewith a dependency on the publishedpackage (aliased as
x11wireso the backend code is otherwise unchanged) anddeletes the internal copy.
Dependency note
This adds a first-party
golang.designmodule dependency. The package isitself pure Go with no third-party or C dependencies, so the clipboard stays
Cgo-free on Linux and the BSDs — consistent with the goal of #25. (The codec is
now reusable for other golang.design graphics work.)
Verification
CGO_ENABLED=0for linux, freebsd, openbsd, netbsd, darwin, andwindows — all green;
go vetclean.go testpasses; Linuxgo testpasses in both cgo modes against aheadless Xvfb (the X11 backend behavior is unchanged — same code, now sourced
from the module).
go.sumpinsgolang.design/x/x11 v0.1.0.