Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
XFlush
call in event loop (rust-windowing#982)
Internally, `XFlush` calls `_XSend` to write data. It then calls `XEventsQueued(display, QueuedAfterReading)`, which reads data from the X server connection. This prevents the event loop source callback from being run, as there is no longer data waiting on the socket. Ideally, we would want to call `_XSend` directly to ensure that no output is buffered by Xlib. However, this function is not exported as part of Xlib's public API. Testing with the `XFlush` call removed does not appear to adversely affect the performance of an application. If any bugs should eventually arise from this change, perhaps another function may be used in place of `XFlush`, such as `XPending`, which writes buffered output but does not so aggressively read from the X server connection. Closes rust-windowing#865
- Loading branch information