Skip to content

fix(cua-driver): isolate Wayland cursors across outputs - #3151

Closed
jacob-vincent-mink wants to merge 4 commits into
trycua:mainfrom
jacob-vincent-mink:fix/wayland-overlay-multi-output
Closed

fix(cua-driver): isolate Wayland cursors across outputs#3151
jacob-vincent-mink wants to merge 4 commits into
trycua:mainfrom
jacob-vincent-mink:fix/wayland-overlay-multi-output

Conversation

@jacob-vincent-mink

Copy link
Copy Markdown

Scope

  • create one click-through layer-shell surface per enabled Wayland output
  • route global cursor coordinates into deterministic output-local coordinates
  • clear the previous surface when cursors move, hide, or end
  • keep named session render state and lifecycle tombstones independent
  • commit the first transparent buffer on every configured or hotplugged surface
  • preserve demand-driven idle scheduling
  • adapt the extracted work to current implicit-session revival semantics

This PR is intentionally limited to the native Wayland cursor overlay. It does not add Hyprland window discovery, capture, or input routing; browser cursor visualization; or the negative-coordinate placement-state change from #3019.

Existing work and coordination

The first three commits were moved with git cherry-pick -x from spencerbull/cua, preserving Spencer Bull as their author and recording each source SHA. The final commit is the current-main lifecycle adaptation.

Validation

Candidate: dbb306c3c7fad34e3fdb3444a2309f1f4d14f46b

  • git diff --check refs/remotes/upstream/main...HEAD
  • cargo fmt --all -- --check
  • cargo test -p platform-linux wayland::overlay --lib: 18 passed
  • cargo test -p platform-linux --lib: 278 passed, 4 environment-dependent ignored
  • cargo test -p cua-driver --test wayland_overlay_idle_test: compiled; 2 live-display tests ignored without an isolated Wayland runtime
  • cargo check -p platform-linux --all-targets

Known gap before readiness

The extracted candidate has not yet been replayed through the canonical Linux desktop E2E harness on a current-main Hyprland or Sway runtime. The original source commits were live-tested on a three-output Hyprland session, including capture completion with every overlay layer active, but that earlier source SHA is supporting evidence rather than certification of this rebased candidate.

@jacob-vincent-mink

Copy link
Copy Markdown
Author

Attribution coordination: the three extracted commits are authored by @spencerbull and retain cherry-pick -x source SHAs, but the repository attribution check requires a distinct same-repository source PR whenever the landing PR author differs from the preserved commit author. These commits came from a fork branch with no upstream source PR, so there is no truthful Salvaged from #... reference I can add. I will keep this draft blocked rather than rewrite away Spencer’s authorship. @spencerbull, could you advise whether you want to sponsor/open the focused contribution or establish an upstream source PR that preserves the provenance? The implementation and scope can remain unchanged.

jacob-vincent-mink added a commit to jacob-vincent-mink/cua that referenced this pull request Aug 13, 2026
Create one initialized layer-shell surface per enabled output, preserve independent named-session cursor state, and keep explicit lifecycle revival aligned with the current session contract.

Adapted with permission from the focused Wayland overlay commits in spencerbull/cua.

Salvaged from trycua#3151

Co-authored-by: Spencer Bull <7035687+spencerbull@users.noreply.github.com>
spencerbull added a commit to spencerbull/cua that referenced this pull request Aug 17, 2026
Create one initialized layer-shell surface per enabled output, preserve independent named-session cursor state, and keep explicit lifecycle revival aligned with the current session contract.

Adapted with permission from the focused Wayland overlay commits in spencerbull/cua.

Salvaged from trycua#3151

Co-authored-by: Spencer Bull <7035687+spencerbull@users.noreply.github.com>
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.

cua-driver: native Wayland cursor overlay loses output and session identity

2 participants