Skip to content
Commit 78cfa967 authored by Kristian Høgsberg's avatar Kristian Høgsberg
Browse files

client: Add wl_display_dispatch_pending() for dispatching without reading

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.
parent 18495347
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment