-
Notifications
You must be signed in to change notification settings - Fork 92
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
Lib crashes on Gnome Wayland when cursor goes over window #206
Comments
Thanks for the report! @nifker any idea about this one? |
It seems this code fn update_cursor(&mut self, cursor: &str) -> std::result::Result<(), ()> {
let cursor = self.cursor.get_cursor(cursor);
if let Some(cursor) = cursor {
let img = &cursor[0];
self.cursor_surface.attach(Some(&*img), 0, 0);
self.cursor_surface.damage(0, 0, 32, 32);
self.cursor_surface.commit();
return Ok(());
}
Err(())
} Will return |
So it looks like the cursor is not provided by the given system: https://smithay.github.io/wayland-rs/wayland_cursor/struct.CursorTheme.html |
That's fun! I did not know that each wayland client was responsible for displaying the cursor! (Or is it not? That's how I understand it. 🤔) |
Yes but only if you want to display the non-default cursor. Otherwise the libwayland-cursor is not even required. |
The log is here: https://dpaste.com/AP4ZM585G I'm not sure it will be useful indeed. |
Well the weird thing is that |
Because I wrote the code lazily, so that it even loads the default cursor from the CursorTheme. |
Right, so the what would be the best way to solve this? I would like to start getting rid of most (all if possible) |
As update() returns "()", our option would be to just ok() it. |
I think it would be better to return |
I meant that we cant return Ok there because the function only returns an empty tuple. |
Hi, I'm doing a stream about Rust, and got affected by this. minifb is by far mi favorite rust lib, so I'm not complaining, actually, keep it up. I really like being able to have per-pixel access, and also be able to run it on old hardware without drivers, or ancient opengl versions. Going back on topic, I created this PR: #238 comments, corrections, fixes are all welcome. Feel free to also downvote whatever you don't like. Thanks! |
This is working OK. I'm using it on wayland without issues. There is no cursor, obviously, but it no longer closes itself. |
Libs
The problem
Tried to run the noise example. It runs, it displays noise. But when I move my mouse cursor over the window, the app crashes with the following stack:
The text was updated successfully, but these errors were encountered: