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: simplify ThemedPointer handling #380

Merged
merged 1 commit into from
May 24, 2023

Conversation

kchibisov
Copy link
Member

This should simplify the handling of custom cursors in the user applications by incapsulating all the necessary state in the ThemedPointer.

In the future we can automatically handle the wp_cursor_shape under the hood.

@kchibisov kchibisov force-pushed the themed-pointer-change branch from 8cecd26 to 79927ac Compare May 6, 2023 10:35
@kchibisov kchibisov marked this pull request as draft May 6, 2023 10:36
@kchibisov
Copy link
Member Author

I've converted to draft to wait for stable release of cursor-icon crate.

rust-windowing/cursor-icon#2

The mentioned crate is shared with @i509VCB , so smithay folks have access to it as well.

I do wonder whether we should maintain fallback lists like we have in winit or simply rely on w3c icon names, from my testing just using w3c icon names worked fine, but I'm not sure how it'll work with weird themes.

@kchibisov kchibisov force-pushed the themed-pointer-change branch from 79927ac to bb487fe Compare May 6, 2023 10:59
@kchibisov
Copy link
Member Author

I've updated the themed_window example to focus on window theming and not print arbitrary events.

Now you can press n key to cycle through cursor shapes.

src/seat/pointer/mod.rs Outdated Show resolved Hide resolved
@kchibisov kchibisov marked this pull request as ready for review May 9, 2023 15:12
@kchibisov
Copy link
Member Author

This should be ready for review now.

@kchibisov kchibisov force-pushed the themed-pointer-change branch from b2e97f4 to 6348dd3 Compare May 10, 2023 14:25
This should simplify the handling of custom cursors in the user
applications by incapsulating all the necessary state in the
ThemedPointer.

The new cursor-icon crate for better compatibility across the
ecosystem, so the icon could be passed as is.

In the future we can automatically handle the `wp_cursor_shape`
under the hood.
@kchibisov kchibisov force-pushed the themed-pointer-change branch from 6348dd3 to 26fe07a Compare May 10, 2023 14:25
@wash2 wash2 merged commit 8166788 into Smithay:master May 24, 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.

3 participants