Skip to content
  • Kristian Høgsberg's avatar
    client: Add wl_display_dispatch_pending() for dispatching without reading · 78cfa967
    Kristian Høgsberg authored
    If the main thread ends up dispatching a non-main queue, and not in
    a wl_display_dispatch() callback, we may queue up main queue events and read
    all data from the socket fd.  When we get back to the main loop, the
    socket fd is no longer readable and nothing will trigger dispatching of
    the queued up events.
    
    The new function wl_display_dispatch_pending() will dispatch any pending
    events, but not attempt to read from the socket.  Clients that integrate
    the wayland socket fd into a main loop should call
    wl_display_dispatch_pending() and then wl_display_flush()
    before going back to blocking in poll(2) or similar mechanism.
    78cfa967