Repository navigation
wlserver: support absolute pointer motion events - #2488
Open
sashakosti wants to merge 1 commit into
Open
sashakosti wants to merge 1 commit into
sashakosti wants to merge 1 commit into
Conversation
In DRM backend mode, absolute pointer devices (such as Sunshine / Moonlight in desktop remote-mouse mode, virtual HID tablets, and absolute digitizers) were unable to move the cursor because Gamescope never registered a listener for pointer motion_absolute events from wlroots. Add a motion_absolute listener to struct wlserver_pointer, map normalized coordinates to output pixel space (with uninitialized output fallback) and focused window surface coordinates, warp the cursor, and ensure the listener link is cleanly removed in wlserver_handle_pointer_destroy(). Closes: ValveSoftware#2458 Co-authored-by: Antigravity <antigravity@google.com>
sashakosti
force-pushed
the
fix/absolute-pointer-motion
branch
from
October 23, 2026 12:54
546bb19 to
360356f
Compare
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.
Summary
Fixes #2458.
In DRM backend mode, absolute pointer devices (such as Sunshine / Moonlight remote desktop mouse mode, virtual HID tablets, and absolute digitizers) were unable to move the cursor because Gamescope never registered a listener for pointer
motion_absoluteevents from wlroots.Changes
struct wl_listener motion_absolutetostruct wlserver_pointerinsrc/wlserver.hpp.wlserver_handle_pointer_motion_absolute()insrc/wlserver.cpp, scaling normalized coordinates[0.0, 1.0]into active output dimensions (g_nOutputWidth,g_nOutputHeightwith fallbacks) and focused window space, and warp the cursor viawlserver_mousewarp().events.motion_absolutelistener duringWLR_INPUT_DEVICE_POINTERdevice creation inwlserver_new_input().pointer->motion_absolute.linkis unlinked inwlserver_handle_pointer_destroy()when a pointer device is disconnected or removed.