Skip to content
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

Remove XFlush call in event loop #982

Merged
merged 1 commit into from
Jun 25, 2019

Commits on Jun 25, 2019

  1. Remove XFlush call in event loop

    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
    murarth committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    1cf5801 View commit details
    Browse the repository at this point in the history