Repository navigation
Add Sway and Hyprland backends to the Linux host - #2
Merged
Merged
Conversation
Create virtual outputs over i3-ipc (Sway) and the Hyprland socket, capture them through ext-image-copy-capture-v1 (with a pointer cursor session) or wlr-screencopy over wl_shm, and map the uinput devices to the output per device. Adds a headless sway test script, fixtures and documentation.
# Conflicts: # README.md
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.
Stacked on #1; retarget to main after #1 merges.
Summary
Adds wlroots-based backends to the Linux host: Sway and Hyprland. Each one creates a virtual output over the compositor's IPC, captures it directly over Wayland (no portal), and maps the uinput input devices to that output. The PipeWire path is unchanged.
Changes
sway.rs): i3-ipc client over$SWAYSOCK. Creates aHEADLESS-noutput, sets its mode withmode --custom, unplugs it on exit, and maps each input device withmap_to_output.hyprland.rs): socket IPC. Createsezdisplay-Nwithoutput create headless, sets the mode withkeyword monitor, removes it withoutput remove, and maps devices withkeyword device[...]:output.wl_capture.rs): usesext-image-copy-capture-v1with an output capture source and a pointer cursor session, so the tablet's local cursor works. Falls back towlr-screencopywith the cursor painted into the frame. Onlywl_shmbuffers are used; DMA-BUF is not yet supported.EZD_WL_CAPTURE=ext|wlr|autoselects the capture protocol.source.rs): the capture source is nowCapture::{Pw, Wl}. The PipeWire path is unchanged.Mapperis not used there.diag.rs): reports the compositor, its version, and the capture protocols it advertises.get_outputsandget_version, unit tests for the Hyprland IPC parsing,tools/wlroots-headless-test.sh(runs headless Sway in Docker whenEZD_WLROOTS_TEST=1), and docs updates indocs/architecture.md,docs/input.md,README.mdandpackaging/linux/.Scope notes
Verification
cargo fmt --check,cargo clippy -- -D warningsandcargo test --workspacepass.tools/wlroots-headless-test.sh,EZD_WLROOTS_TEST=1):ext-image-copy-capture.wlr-screencopy.map_to_outputfor all devices.ezd-fake-client: no regression. Virtual output is 1920x1080, and touch and pen are mapped.