[RFC weston 0/2] Event loop abstraction API

Quentin Glidic sardemff7+wayland at sardemff7.net
Mon Feb 19 19:19:03 UTC 2018


From: Quentin Glidic <sardemff7+git at sardemff7.net>

We discussed on IRC about races between the several event sources that
exist in libweston, libwayland and compositor code. Adding a priority
system in the event loop is a first step to fix these potential races
and help cope with bad clients.
A second issue is that compositor writers are usually used to some
specific event loop library (GLib, Qt, libev or any other) with
differences in APIs and some frameworks are tied to one.

To make things easier to compositor writers, here is a draft for an
event loop API abstraction that should allow to pick any library to work
with libweston.
(Still lacking the signal handling part.)

Sending as RFC to check if the API is fine by Weston contributors before
migrating all the codebase to it.

Cheers,

Quentin Glidic (2):
  libweston: Add event loop abstraction API
  compositor-x11: Use event loop abstraction API

 compositor/main.c          | 182 +++++++++++++++++++++++++++++++++++++++++++--
 libweston/compositor-x11.c |  64 ++++++++--------
 libweston/compositor.c     |  86 +++++++++++++++++++++
 libweston/compositor.h     |  67 +++++++++++++++++
 4 files changed, 358 insertions(+), 41 deletions(-)

-- 
2.15.1



More information about the wayland-devel mailing list