-
Notifications
You must be signed in to change notification settings - Fork 50
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 animation example fails on Gnome #48
Comments
I assume winit has a way to indicate if a window has stopped resizing. We could present a single color there to make resizes much faster. |
I've just been testing with the As for the issue with |
Okay, I can reproduce the freeze and error on Gnome. The error occurs with smithay/cosmic-comp, but less consistently and without freezing the session. It seems with So the way I implemented that doesn't seem to be adequate. |
We could wait for a buffer release as suggested in #41. But then it needs to be documented that |
For something like the animation example, anyway, the correct way to handle it would normally be to queue a redraw in response to the Wayland surface's frame callback, right? While it doesn't look like winit's Wayland backend makes use of frame callbacks? While queuing a redraw on |
rust-windowing#41 If `set_buffer` can just be called in a loop without waiting for buffers to be released or a frame callback, but can also be called in other ways, I don't know if there's a better solution than blocking. Should fix rust-windowing#48. The animation example could probably be implemented better, but this is at least better. I guess it should be documented that `set_buffer` may block? I don't know how this compares to other backends.
rust-windowing#41 If `set_buffer` can just be called in a loop without waiting for buffers to be released or a frame callback, but can also be called in other ways, I don't know if there's a better solution than blocking. Should fix rust-windowing#48. The animation example could probably be implemented better, but this is at least better. I guess it should be documented that `set_buffer` may block? I don't know how this compares to other backends.
This is fixed if we change But we probably don't want to block the thread calling |
Apparently this has already been discussed in winit (rust-windowing/winit#2412). Sounds like that's a bit of a mess to support on X, I guess an issue for winit on Wayland since it doesn't know when a buffer is committed, and I'm not sure about other platforms. |
The resizing issue seems to be a winit thing and should be fixed by rust-windowing/winit#2610. |
When running the animation example on Gnome/Mutter 43.2 it causes the entire desktop to freeze for about half a second, then the example terminates with the following error:
I've known about this bug for some time, but when I tried diving into Wayland to fix it, I was unable to find a solution. Maybe you can shed some light @ids1024?
Additionally, some other examples (notably winit_wrong_sized_buffer and fruit) are janky insofar as resizing causes temporary freezes of the softbuffer window.
The text was updated successfully, but these errors were encountered: