| title | Xpra #4883 — per-client coordinate translation: draft design notes |
|---|---|
| status | early draft, work in progress |
| issue | Xpra-org/xpra#4883 |
| prior_gist | https://gist.github.com/gwpl/b07b93e6a07091d1a30d5fd0cc97d831 |
| source_url | https://gist.github.com/gwpl/{TBD-after-publish} |
| created | 2026-05-17 |
| author | Greg (gwpl), with AI assistance for wording / structuring |
AI 🤝 Greg: this whole gist is an early-draft thinking artifact, not a spec. Greg dumped a lot of voice-note-style thoughts about the problem; the AI organized them into the structured-but-still-draft text you are reading. Treat every file here as "a sketch of how we might think about the cases", not as a proposal of final behaviour. Wording, naming and even axis splits are expected to change once the maintainers signal which direction is welcome.
The original issue Xpra-org/xpra#4883 asked whether per-client server↔local coordinate translation would be welcome. The maintainer's reply made two things clear:
- Geometry is genuinely hard, and a single-line "list of translations per client" framing is too glib — there are non-trivial edge cases the original ask under-acknowledged.
- The previous attempt down a similar path (#3454) ended up painful enough that the bar for any new contribution here is higher than usual.
This gist is Greg's attempt to do the organising-the-cases pre-work in public, before asking for any code review time — so that if the maintainers ever do say "yes, this direction is welcome", we already share a vocabulary for the edge cases, an agreed set of test inputs/outputs for the simple subset, and a deliberately-staged plan from "simplest useful thing" to "general multi-monitor mapping".
01-edge-cases-and-update-rituals.md— the edge cases Greg now sees more clearly than when filing the issue, each paired with a candidate "update ritual" (what xpra would need to recompute and re-send when the case is triggered).02-axis-limit-and-movement-interval.md— the per-axis mathematical framing of "window is bigger than the visible slot": the movement-interval shrinks to zero, after which no fully-visible anchor position exists. Drives the degenerate-case rules.03-coverage-matrix-combinatorial.md— combinatorial coverage of the (window-vs-monitor) × (server-vs-client) × (geometry-vs-input) dimensions, marking which combinations are covered / partially covered / deferred / out-of-scope for the first iteration.04-mapping-models-spectrum.md— the (A)→(F) spectrum from the original issue, refined: which model each edge case forces, and what the smallest useful subset is.05-deferred-server-virtual-desktop-LCM.md— a deliberately deferred sub-discussion: should the server's virtual desktop size be picked as an LCM / common-grid of client resolutions, to reduce rounding loss when translating? Kept separate so it doesn't block the basic case.06-acm-icpc-style-testbed-plan.md— the external-repo plan: input/output sample format, golden-test layout, what the first ~20 test cases should look like.07-library-boundary-proposal.md— sketch of a pure, side-effect-free Python module that takes(server_geometry, client_geometry, mapping_spec, event)and returns translated geometry/events — so xpra canimportit and other future tools (Wayland forwarders, X11 multi-seat helpers) could too.08-pr-roadmap.md— staged plan once design alignment is reached: minimal client-only PR (option A) → richer per-client mapping → optional per-window-class layer (option F).
- Not a request for review of code. There is no code in this gist.
- Not a proposal that the maintainers should do any of this themselves.
- Not a claim that the cases listed here are exhaustive — they are a snapshot of what Greg currently sees, written down so that gaps become easier to spot and discuss.
Greg expects to work on this in spare-time bursts with potentially multiple weeks between updates. If the maintainers find this direction worth their review time at all, the request is for very low-frequency check-ins (e.g., "does this look like the right shape?" once per major file rewrite) — not sustained synchronous collaboration. If that cadence doesn't fit, that's totally fair — Greg will keep iterating in this repo regardless, and a future PR (if ever) will arrive only after the pre-work feels solid.