winit-sonoma-fix/src/platform_impl/linux/wayland
Victor Berger a3739d6bad
wayland: instantly wake up if events are pending (#1153)
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
2019-09-11 08:28:21 +02:00
..
event_loop.rs wayland: instantly wake up if events are pending (#1153) 2019-09-11 08:28:21 +02:00
keyboard.rs Implement WindowEvent ModifiersChanged for X11 and Wayland (#1132) 2019-09-08 11:43:28 -07:00
mod.rs Add exclusive fullscreen mode (#925) 2019-07-29 14:16:14 -04:00
pointer.rs Fix warnings on Linux (#1004) 2019-07-03 14:18:42 -04:00
touch.rs Add touch pressure information for touch events on iOS (#1090) 2019-08-13 18:12:13 -04:00
window.rs Implement raw_window_handle::HasRawWindowHandle for Window type (#1105) 2019-08-14 07:57:16 -04:00