mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-27 15:41:31 +11:00
a3739d6bad
Just before starting to poll/wait on calloop(mio), check if there are already events pending in the internal buffer of our wayland event queue. If so, dispatch them and force an instant wakeup from the polling, in order to behave as if we were instantly woken up by incoming wayland events. When using OpenGL, mesa shares our wayland socket, and also reads from it, especially if vsync is enabled as it'll do blocking reads. When doing so, it may enqueue events in the internal buffer of our event queue. As the socket has been read, mio will thus not notify it to calloop as read, and thus calloop will not know it needs to dispatch. In some cases this can lead to some events being delivered much later than they should. Combined with key repetition this can actually cause some flooding of the event queue making this effect event worse. Fixes #1148 |
||
---|---|---|
.. | ||
event_loop.rs | ||
keyboard.rs | ||
mod.rs | ||
pointer.rs | ||
touch.rs | ||
window.rs |