gamescope: forward wl_touch input in the nested Wayland backend#2
Open
brycesub wants to merge 3 commits into
Open
gamescope: forward wl_touch input in the nested Wayland backend#2brycesub wants to merge 3 commits into
brycesub wants to merge 3 commits into
Conversation
The Wayland backend's input thread only wired up pointer and keyboard; wl_touch was declared but never requested from the seat, so touch was dead whenever gamescope runs nested under another compositor. Add the wl_touch listener and translate events into wlserver touch input with the same normalized coordinates the pointer path uses. Needed for the dual-screen nested gaming session on the AYN Thor (virtudude/armada#28 phase 2), where gamescope runs as a fullscreen window inside the desktop session. Validated on hardware: taps land exactly on target on the top screen; multi-touch ids tracked; cancel releases all held touches. Upstream candidate for ValveSoftware/gamescope. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMbeBSJJG1pNfdqkUcG1gn
This was referenced Jul 8, 2026
GetValidDynamicRefreshRates() returned an empty span in the Wayland backend (the host's mode list is not visible to a nested client), so gamescope_control advertised only the current rate and Steam's refresh slider collapsed to a single value. Read GAMESCOPE_NESTED_REFRESH_RATES (comma-separated Hz, set by armada's nested-gaming from ARMADA_PANEL_REFRESH_RATES) so Steam offers the panel's real range; the nested-refresh-bridge in armada applies the requested mode through the host compositor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMbeBSJJG1pNfdqkUcG1gn
The Wayland backend requested fullscreen with a null output, so the host compositor placed gaming mode on whichever output was last active - on dual-screen devices sometimes the wrong panel. Track wl_output names and pass the first -O/--prefer-output match to the fullscreen request; armada's nested-gaming passes the device's primary connector. Validated on AYN Thor: gaming mode lands on the top screen on every launch regardless of pointer/focus position. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMbeBSJJG1pNfdqkUcG1gn
Author
|
Pushed two more nested-backend patches, both hardware-validated on the Thor alongside the touch one: 0008 advertises panel refresh rates from 🤖 Generated with Claude Code |
Author
|
The wl_touch patch is now submitted upstream: ValveSoftware/gamescope#2244. If it lands there, patch 0007 can be dropped on the next gamescope version bump. 🤖 Generated with Claude Code |
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.
gamescope's nested (Wayland) backend wires up pointer and keyboard input from the host compositor but never requests
wl_touchfrom the seat — them_pTouchmember exists upstream but is dead code — so touchscreens do nothing whenever gamescope runs as a window inside another compositor.This adds the
wl_touchlistener on the input thread and translates down/up/motion/cancel into wlserver touch input, using the same fractional-scale + plane-offset coordinate normalization as the existing pointer path (and the samewlserver_touch*calls the SDL backend uses).Why
Part of AYN Thor dual-screen phase 2 (virtudude/armada#28): gaming mode as a nested gamescope inside the desktop session, Steam on the top screen and plasma on the bottom. Without this, the top screen loses touch in nested mode.
Validation (on hardware)
Built 3.16.24 + this patch for aarch64 and ran it as the nested gaming compositor on an AYN Thor: taps land exactly on target across the top screen in Steam gamepadui, scrolling works, and the bottom-screen desktop touch is unaffected. The patch applies cleanly via the spec's
%autopatch -p1.Upstream candidate for ValveSoftware/gamescope — happy to submit it there too.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XMbeBSJJG1pNfdqkUcG1gn