-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace libxcursor with custom cursor code #3749
Conversation
b591543
to
f19993a
Compare
92b431b
to
17c60e7
Compare
Meeting resolution: @kchibisov will take a look once he has time |
@kchibisov Have you had a chance to look over this one yet? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Works flawlessly.
I'm fine with panicking if we can reasonably assume that this shouldn't happen.
But if it can happen, I believe we have two choices: print the error with tracing
and move on (which other backends do as well right now), or return the error to the user, which would necessitate an API change.
I would be in favor of an API change in a follow-up, other backends could make use of that as well. So my suggestion would be to not panic and print the error in tracing
in this PR, unless of course in your opinion this should never happen.
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.
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). |
17c60e7
to
2e31070
Compare
I've set this up now. |
2e31070
to
07a8d38
Compare
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 Signed-off-by: John Nunley <dev@notgull.net>
07a8d38
to
876cd0a
Compare
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
changelog
module if knowledge of this change could be valuable to users