event-loop: export wl_event_loop_dispatch_idle()
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 11 Sep 2012 14:09:34 +0000 (16:09 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 12 Sep 2012 16:28:54 +0000 (12:28 -0400)
commit003a946aa66333ac1cf927fc1498d85c2c9644f9
tree02233760ecc2c719af1b856ba6a55d7f81b1bb04
parent9fe135c46f2457d6dc694e4c02d2defeab6986b0
event-loop: export wl_event_loop_dispatch_idle()

When integrating the wayland event-loop into another event-loop, we
currently have no chance of checking whether there are pending idle
sources that have to be called. This patch exports the
"dispatch_idle_sources()" call so other event loops can call this before
going to sleep. This is what wl_event_loop_dispatch() currently does so we
simply allow external event-loops to do the same now.

To avoid breaking existing applications, we keep the call to
dispatch_idle_sources() in wl_event_loop_dispatch() for now. However, if
we want we can remove this later and require every application to call
this manually. This needs to be discussed, but the overhead is negligible
so we will probably leave it as it is.

This finally allows to fully integrate the wayland-server API into
existing event-loops without any nasty workarounds.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/event-loop.c
src/wayland-server.h