Fix mouse mapping on rotated Wayland screens#543
Closed
aydreas wants to merge 1 commit into
Closed
Conversation
Screen content orientation is corrected at render time via texture-UV remapping, so pointer hits arrive in the upright logical orientation. Map the mouse without applying the output transform, avoiding a second rotation of the cursor position.
Collaborator
|
have you tried just choosing the correct mapping via edit mode / mouse? desktops map it differently so there's no single right solution. |
Author
|
Oh, I didn't know that existed. Thank you - that fixes it too. Would have saved me a bunch of time if I knew haha |
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.
When interacting with a rotated Wayland output, the mouse ends up in the wrong
spot - as if the screen wasn't rotated. The screen itself renders upright fine,
only the pointer is off.
Since #530, screen orientation is corrected at render time via texture-UV
remapping, so
hit.uvis already in the output's upright/logical orientation.But the screencopy path still set
mouse_transform_original = output.transform,which rotated that already-upright UV a second time - landing the cursor on the
un-rotated physical layout.
Fix: map the mouse with
Transform::Normal. Logical coords for a rotated outputare already upright, so
uv -> logical_pos + uv * logical_sizeis correct. X11 already usedNormal.