fix(cua-driver): support Hyprland capture and input - #3052
Draft
RodriMora wants to merge 6 commits into
Draft
Conversation
RodriMora
force-pushed
the
fix/2964-hyprland-toplevel-capture
branch
from
August 10, 2026 18:52
2e88d91 to
63ab7e6
Compare
Resolve one Hyprland client from compositor title/app-id plus the verified target PID, then capture its own surface through hyprland-toplevel-export-v1. Ambiguous or unavailable identities retain the typed fail-closed result. Preserve existing capture behavior on other Wayland compositors. Salvaged from trycua#1876. Co-authored-by: shuv <shuv@shuv.dev>
RodriMora
force-pushed
the
fix/2964-hyprland-toplevel-capture
branch
from
August 10, 2026 19:02
63ab7e6 to
7195b69
Compare
Use compositor geometry for stable window ids, mixed-scale pointer positioning, screenshot mapping, and renderer AT-SPI bounds. Exercise WebKitGTK through its valid SHM path and expose unsupported Hyprland button semantics as a typed limitation instead of false success. Adapted the Hyprland cursor-positioning design from https://github.com/IlyasKhallouki/hypruse. Co-authored-by: Ilyas Khallouki <IlyasKhallouki@users.noreply.github.com>
Bind embedded browser routes through compositor-attested native cardinality, normalize desktop and scroll coordinates under fractional scaling, keep the foreground sentinel out of the tiling tree, and refuse WebKitGTK background pixel clicks rather than reporting false delivery.
Propagate native Wayland and Hyprland session identity into private workers, preserve explicit 64-bit target ids during recording, classify geometry-free semantic clicks without invented pixel markers, and make two wheel ticks clear a full WebKit viewport.
Carry forward the trusted main-branch identity override while adding the credited Hyprland protocol contributor mapping.
Author
|
The following is human written: |
This was referenced Aug 13, 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.
Purpose
This is a stacked contribution to #2964, not a competing landing pull request. Its base is #2964's branch. Merge or cherry-pick it into #2964; do not land it independently on
main.The original #2964 candidate correctly failed closed for #2962, but did so for every Wayland window and therefore removed screenshots required by the accepted Sway/capture matrix. This adaptation now covers the complete tested Hyprland desktop contract:
hyprland-toplevel-export-v1, including occluded and off-workspace XWayland windows;surface_identity_unprovenresult for missing, ambiguous, timed-out, or failed identity/capture;hyprlanddesktop harness mode, exact-source evidence, and strict result validation.Material protocol/capture design is salvaged from #1876 and credited in the commit trailer. The cursor-positioning design is adapted from
hypruseand credits Ilyas Khallouki. The attribution config maps the source contributor's verified email to@shuv1337as required by repository CI.Validation
Final stack head:
2d6d88e58c2aa163e44c8abb41fc3f89f62fe225Certified executable candidate:
1bcb4b59148d1bbe82f41717010ee45c4c749039. The final head differs only by carrying forward a trusted main-branch attribution identity override alongside the credited contributor mapping; no executable or test source changed.Representative Hyprland desktop E2E
Canonical command:
Result on Arch/Omarchy, Hyprland 0.56, mixed native Wayland/XWayland, and 1.25x/1.5x outputs:
environment.jsonland the generated report;This includes Electron, Tauri/WebKitGTK, GTK3, GTK4, private-worker display inheritance, embedded-browser binding, mixed-scale desktop actions, agent cursor pixels, strict click evidence, and off-workspace XWayland target capture.
Focused and package checks
cargo fmt --all -- --checkgit diff --checkcargo test -p platform-linux --features portal-input --locked: 285 passed, 4 environment-dependent ignoredcargo test -p cua-driver-core --locked: 503 passed, 1 doc test ignoredcargo test -p cua-driver-sdk --locked: 45 passedXDG_SESSION_TYPE=x11 cargo test -p cua-driver-testkit --locked: 75 passedcargo build --release -p cua-driver --features portal-input --lockedA separate read-only off-workspace native-window capture smoke preserved the active workspace and focused window while returning the target's current pixels and accessibility state.
Known boundaries and integration gates
portal-capture/all-features builds are blocked on this Arch host by PipeWire 1.6 versuslibspa 0.8; the testedportal-inputfeature builds and passes.mainand ordinary PR CI.Contributes to #2964. Refs #2962.