WaylandBackend: forward wl_touch input from the host compositor#2244
Open
brycesub wants to merge 1 commit into
Open
WaylandBackend: forward wl_touch input from the host compositor#2244brycesub wants to merge 1 commit into
brycesub wants to merge 1 commit into
Conversation
The Wayland backend's input thread wires up pointer and keyboard input but never requests wl_touch from the seat (m_pTouch was declared but unused), so touchscreens are dead whenever gamescope runs nested under another compositor. Request wl_touch when the seat advertises the capability and translate down/up/motion into wlserver touch input, normalizing surface-local coordinates with the same fractional-scale and plane-offset math as the pointer path. touch cancel releases all held touch points so nothing gets stuck. Tested with Steam inside nested gamescope under KWin (Plasma 6) on a dual-screen ARM handheld: taps land on target, scrolling and multi-touch id tracking work, and gamescope's touch click modes behave the same as with the embedded/SDL paths since events flow through the normal wlserver touch input.
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.
The Wayland backend's input thread wires up pointer and keyboard input but never requests
wl_touchfrom the seat —m_pTouchis declared but never used — so touchscreens do nothing whenever gamescope runs nested under another compositor.This requests
wl_touchwhen the seat advertises the capability and adds the listener on the input thread, translating down/up/motion into wlserver touch input. Coordinates are normalized with the same fractional-scale and plane-offset math the pointer path uses, andtouch.cancelreleases all held touch points so nothing gets stuck.Testing: Steam gamepadui inside nested gamescope under KWin (Plasma 6) on a dual-screen ARM handheld (AYN Thor, Adreno 740/Turnip Mesa): taps land exactly on target, scrolling works, multi-touch ids are tracked, and gamescope's touch click modes behave the same as the embedded/SDL paths since events flow through the normal wlserver touch input. Validated on 3.16.24; applies to and compiles clean on current master.