wayland: Yet more cursor work #14365
Merged
+567
−480
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.
Use viewports to handle scaled custom cursors instead of building a new set of images for every scale, and set tablet tool cursors separately from the pointer cursor, as some compositors don't implicitly use the pointer cursor when the tablet cursor is unset, and the presence of a tablet doesn't imply that the pointer capability will be exposed.
There isn't that much change to the cursor logic itself, but splitting out the cursor state so that it can be used by both pointer and tablet tool cursors caused a lot of churn, so it's probably best to hold on merging this until 3.4.2 to allow for time to shake out any subtile bugs this might have introduced. The tablet changes could also do with more testing, as they seem to work with emulated input, but more testing on real hardware would be preferable (the Osu project tends to find these bugs quickly).
Fixes #14332