-
Notifications
You must be signed in to change notification settings - Fork 921
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
Wayland support for set_cursor_icon #1204
Conversation
28647c9
to
21bb3d7
Compare
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, thanks ! 👍
The animation of the cursors is indeed something that will have to be fixed at SCTK's level.
EDIT: The top of the stack trace containing the error message was lost somewhere in the copy + past Hate to be the bearer of bad news, but this broke my project because I am running set_cursor_visible and set_cursor_grab from another thread than the event loop. I am getting this error:
As far as I can see from the documentation you should be able to move the window to another thread:
Interestingly enough I tried the exact same thing of passing the cursor_manager to the window class in a mutex when I implemented the set_cursor_visible and the set_cursor_grab, but because of this error I had to to add some arguments to the giant closure in WindowStore::for_each. |
@andersrein Would you mind sharing a code for me to repro this issue? I can't repro in alacritty btw. The initial approach with cusror_change and for_each thing wasn't working, because things were delayed with updates in some cases. P.s. I've tested all the functions I've changed. P.P.s. Ah, ok we're not moving windows between threads in alacritty. the code will be appreciated. |
@kchibisov It is a fairly giant project. Let me see if I can hack together a minimal reproducible example |
@andersrein Ok, let me try something. Would you mind testing set_cursor_icon and set_cursor_visible? |
I'm kind of new to github and open source contributing in general... What is the best way to just share a source file or a patch over github? Anyway, I was able to reproduce it by modifying the cursor_grab example. Pasting the entire code into this comment:
|
@andersrein Ok, thx for the example. I've understood the issue and will send a fix soon. |
cargo fmt
has been run on this branchCHANGELOG.md
if knowledge of this change could be valuable to usersCursors' names were copied from X11 implementation, however some of them were truncated, but I've checked these cursors on X11 and Wayland and they were the same. I've also noticed that animated cursors don't work, but I feel like it's a SCTK problem.
P.s.
I've also added cursor grab to feature matrix, since it was recently implemented, but not added to matrix.