mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-10 05:01:31 +11:00
2ee658048a
WaitEventsIterator implements waiting by first calling XPeekEvent which will block until at least 1 event is queued, and then it delegates to PollEventsIterator to actually handle the new event. PollEventsIterator was previously picky about which events it would process. Events of other types would get stuck at the head of the X event queue, and PollEventsIterator would return None. This initiated a busy loop in the WaitEventsIterator because it would XPeekEvent, see that something is there, and then PollEventsIterator would return None, and the process would repeat. This is resolved by using XNextEvent in the PollEventsIterator instead of XCheckTypedEvent. Any event in the queue will be popped. Even if winit isn't interested in the event, this means XPeekEvent will block again to wait for another event instead of the previous behavior. |
||
---|---|---|
.. | ||
wayland | ||
x11 | ||
dlopen.rs | ||
mod.rs |