Skip to content
New issue

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

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

Already on GitHub? # to your account

seat/pointer: automatically use cursor-shape-v1 #381

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

kchibisov
Copy link
Member

@kchibisov kchibisov commented May 6, 2023

When using ThemedPointer automatically use the cursor-shape-v1
protocol to set cursor icon when it's present.

We still accept the WlSurface and WlShm when building the
ThemedPointer to handle the pointer hiding and custom cursor
setting.

--

The protocol could be found https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/194 .

I'm not sure if abusing SeatState is 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 a CursorShapeManager.

The macros handling is baked into delegate_pointer because the protocol doesn't have events on its own and there's nothing to customize.

The patch is built on top of #380.

@kchibisov kchibisov force-pushed the add-cursor-shape-v1 branch 2 times, most recently from 7dc1979 to 1da51ee Compare May 6, 2023 14:29
@kchibisov
Copy link
Member Author

Blocked on Smithay/wayland-rs#624

@kchibisov kchibisov force-pushed the add-cursor-shape-v1 branch from 1da51ee to fdb57b9 Compare July 20, 2023 17:41
@kchibisov kchibisov marked this pull request as ready for review July 20, 2023 17:41
src/seat/mod.rs Outdated Show resolved Hide resolved
@kchibisov
Copy link
Member Author

beep @wash2 @i509VCB

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.
@kchibisov kchibisov force-pushed the add-cursor-shape-v1 branch from fdb57b9 to 62a6882 Compare August 10, 2023 04:08
@wash2 wash2 merged commit 795234a into Smithay:master Aug 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants