fix(linux/input): emulate relative mouse movement from absolute coordinates - #5529
Open
danalec wants to merge 1 commit into
Open
fix(linux/input): emulate relative mouse movement from absolute coordinates#5529danalec wants to merge 1 commit into
danalec wants to merge 1 commit into
Conversation
Member
|
It won't pass until I approve the workflows. Anyway... Thank you for the PR submission, but it looks like you used AI to create this PR. Please read and follow our Contributing guidelines and specifically our AI Usage policy. Additionally, please update the PR to use the correct template. You can find it at https://github.com/LizardByte/.github/blob/master/.github/pull_request_template.md?plain=1 |
Convert absolute mouse input to relative deltas, accumulating fractional deltas so slow (sub-pixel) motion still moves the cursor on both axes. Moonlight TV clients send absolute positions; emitting relative deltas makes the COSMIC magnifier follow the cursor (PointerMotionAbsolute never updates the zoom focal point — pop-os/cosmic-comp LizardByte#2760).
danalec
force-pushed
the
pr/abs-mouse-relative
branch
from
August 21, 2026 01:10
7fc91f8 to
25164e4
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
Moonlight TV clients (and other absolute-motion sources) send absolute mouse
positions (
MOUSE_MOVE_ABS_MAGIC). The Linux backend forwards them as absoluteuinput events, which compositors treat as absolute pointer motion.
COSMIC's magnifier does not track the cursor on absolute motion:
PointerMotionAbsolutemoves the cursor but never callsupdate_focal_point(pop-os/cosmic-comp#2760; same symptom class as #1418/VirtualBox). Relative
motion (
PointerMotion) updates the zoom on every event, so converting absoluteinput to relative deltas makes the magnifier follow the cursor.
How it works
baseline (
abs_mouse).move_mouse) based on thetracked last position, so the cursor arrives at the compositor as relative
pointer motion.
Testing
Verified on a KVM guest (CachyOS/COSMIC 1.5) streaming to a Moonlight TV client:
with the patch the magnifier follows the cursor; without it, the zoomed view
stays fixed.
Related