You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cursor icon refuses to change when hovering over the window's borders. When actively resizing, it changes to the correct icon, but goes back to its previous state after. Inside the window, it retains its previous state, even from other windows.
Looks like in the themed_window example, the result of smithay_client_toolkit::seat::pointer::ThemedPointer::set_cursor is ignored, yet every call to it returns PointerThemeError::CursorNotFound.
Looks like get_cursor expects a cursor icon name like bottom_left_corner (which it got in the previous version, and which still works when temporarily testing on latest master) but now receives a name like sw-resize through icon.name().
Huh, indeed, when using the default Adwaita cursor theme it works as expected.
Would it be beneficial to fall back to legacy cursor icon names to accommodate users with outdated cursor themes? I would be open to making a Pull Request for this.
Or we can try to update legacy themes while at it. The future users won't be affected by that anyway due to cursor-shape-v1. It's not like adding a symlink inside the theme will hurt anyone.
Of course patching themes would be the best solution, but it is not realistic. In the best case users get their cursor themes from the package manager, but I don't believe there will be a big effort to update them all. In the worst case cursor themes are downloaded from random websites, good luck updating any of these.
Yes, I guess this can be worked around by symlinks, but the average user won't know this. They won't even know what is causing the problem.
How should the API for this work? Older winit versions seem to have already had some kind of "fallback" system, where in some cases multiple cursors are tried until one works. See
Activity
Friz64 commentedon Oct 30, 2023
Looks like in the
themed_windowexample, the result ofsmithay_client_toolkit::seat::pointer::ThemedPointer::set_cursoris ignored, yet every call to it returnsPointerThemeError::CursorNotFound.Friz64 commentedon Oct 30, 2023
Looks like
get_cursorexpects a cursor icon name likebottom_left_corner(which it got in the previous version, and which still works when temporarily testing on latest master) but now receives a name likesw-resizethroughicon.name().client-toolkit/src/seat/pointer/mod.rs
Lines 461 to 464 in 05e3f7f
kchibisov commentedon Oct 30, 2023
https://www.freedesktop.org/wiki/Specifications/cursor-spec/
fix your cursor theme.
Friz64 commentedon Oct 30, 2023
Huh, indeed, when using the default Adwaita cursor theme it works as expected.
Would it be beneficial to fall back to legacy cursor icon names to accommodate users with outdated cursor themes? I would be open to making a Pull Request for this.
kchibisov commentedon Oct 30, 2023
Or we can try to update legacy themes while at it. The future users won't be affected by that anyway due to
cursor-shape-v1. It's not like adding a symlink inside the theme will hurt anyone.kchibisov commentedon Oct 30, 2023
You can also try to add alternative cursor names to https://github.com/rust-windowing/cursor-icon/ , but I'd sort of prefer to get themes patched as well.
Friz64 commentedon Oct 30, 2023
Of course patching themes would be the best solution, but it is not realistic. In the best case users get their cursor themes from the package manager, but I don't believe there will be a big effort to update them all. In the worst case cursor themes are downloaded from random websites, good luck updating any of these.
Yes, I guess this can be worked around by symlinks, but the average user won't know this. They won't even know what is causing the problem.
How should the API for this work? Older winit versions seem to have already had some kind of "fallback" system, where in some cases multiple cursors are tried until one works. See
https://github.com/rust-windowing/winit/blob/2ebbfab6a47f93f76841553dcb3cc53683e4955c/src/platform_impl/linux/wayland/seat/pointer/mod.rs#L78-L126
kchibisov commentedon Oct 30, 2023
Friz64 commentedon Oct 30, 2023
Opened a PR: rust-windowing/cursor-icon#11
I will also make a PR for this repository utilizing the new method so it can be tested.