Replace libxcursor with custom cursor code
Another one bites the dust.
This replaces the code dependent on libxcursor with equivalent code written using x11rb, featuring its special "cursor" module.
cc #3198
- [x] Tested on all platforms changed
- [x] Added an entry to the
changelogmodule if knowledge of this change could be valuable to users - [x] Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
- [x] Created or updated an example program if it would help users understand this functionality
- [x] Updated feature matrix, if new features were added or implemented
Meeting resolution: @kchibisov will take a look once he has time
@kchibisov Have you had a chance to look over this one yet?
X11 sits on top of the I/O stack and every I/O function is fallible. So every winit function would also need to return a Result. Not that I oppose this; I think this is the ideal way to go.
X11 sits on top of the I/O stack and every I/O function is fallible. So every winit function would also need to return a Result. Not that I oppose this; I think this is the ideal way to go.
I made #3844 to address at least this PR. So for this PR I propose:
- Return an error in
create_custom_cursor(). - If an error happens in
set_cursor(), usetracingto deliver the error and do nothing instead of panicking. Lets address this in the future more globally.
WDYT?
Yeah, in general, if you can not set something you just do nothing. There's no guarantee that all the functions will work, because window manager can just ignore the request and you generally don't know that until you try to query it.
So just ignore the errors for setting cursor(that's how it's done on Wayland as well here).
Return an error in
create_custom_cursor().If an error happens in
set_cursor(), usetracingto deliver the error and do nothing instead of panicking. Lets address this in the future more globally.
I've set this up now.