Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input: subscribe to tablet tool events from cursor #2060

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jp7677
Copy link
Contributor

@jp7677 jp7677 commented Aug 8, 2024

Contrary to the raw tablet events, the cursor events transform the coordinates based on a mapped output orientation. Otherwise those events are the same. See https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/types/wlr_cursor.c#L897

Note that this only applies to absolute coordinates, the relative ones (dx, dy) are not transformed, in that case a user still has to manually set rotation in our tablet config.

Additionally our own rotation is applied after area transformation, but the auto rotation is applied before. No real issue, just a slightly inconsistent behavior. We could turn around our behavior though to make this fully consistent, which is a minimal change.

TODO:

  • More testing
  • Clarify auto rotation in the docs (tablet -> mapToOutput)
  • Apply rotation before (instead after) area transformation for consistent rotation behavior

Closes #1990

cc: @dashavoo

Contrary to the raw tablet events, the cursor events transform
the coordinates based on a mapped output orientation.
Otherwise those events are the same.
@jp7677 jp7677 marked this pull request as ready for review August 8, 2024 16:09
@jp7677
Copy link
Contributor Author

jp7677 commented Aug 8, 2024

@dashavoo This should solve your issue, would be nice if you could confirm.

This makes the behavior consistent with auto-rotation
as a result of output mapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stylus input doesn't rotate.
1 participant