seat/pointer: automatically use cursor-shape-v1#381
Merged
wash2 merged 1 commit intoSmithay:masterfrom Aug 10, 2023
Merged
Conversation
7dc1979 to
1da51ee
Compare
Member
Author
|
Blocked on Smithay/wayland-rs#624 |
1da51ee to
fdb57b9
Compare
kchibisov
commented
Jul 20, 2023
Member
Author
When using `ThemedPointer` automatically use the `cursor-shape-v1` protocol to set cursor icon if the seat was made aware to use cursor_shape. We still accept the `WlSurface` and `WlShm` when building the `ThemedPointer` to handle the pointer hiding and custom cursor setting.
fdb57b9 to
62a6882
Compare
wash2
approved these changes
Aug 10, 2023
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 using
ThemedPointerautomatically use thecursor-shape-v1protocol to set cursor icon when it's present.
We still accept the
WlSurfaceandWlShmwhen building theThemedPointerto handle the pointer hiding and custom cursorsetting.
--
The protocol could be found https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/194 .
I'm not sure if abusingSeatStateis the way to go, but I don't really like passing the global around(messy) or implicitly binding(some clients don't use pointer). So for now I've decided to optionally pass the value to::new.I've adjusted to use
builder-like syntax to provide aCursorShapeManager.The macros handling is baked into
delegate_pointerbecause the protocol doesn't have events on its own and there's nothing to customize.The patch is built on top of #380.