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? |
daxpedda
left a comment
There was a problem hiding this comment.
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
changelogmodule if knowledge of this change could be valuable to users