compositor-x11: Remove support for ancient XCB
We had two non-pkg-config check paths in the configure script, to
support XCB functionality used before XCB had had an accompanying
release: xcb_poll_for_queued_event (released in 1.8, 2012), and a
usable XKB event mechanism (released in 1.9, 2013).
Convert the former to a version-based hard dependency, and the latter to
a version-based soft dependency. This avoids two compiler checks.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
index 34ef854..627bb15 100644
--- a/libweston/compositor-x11.c
+++ b/libweston/compositor-x11.c
@@ -1298,15 +1298,10 @@
x11_backend_next_event(struct x11_backend *b,
xcb_generic_event_t **event, uint32_t mask)
{
- if (mask & WL_EVENT_READABLE) {
+ if (mask & WL_EVENT_READABLE)
*event = xcb_poll_for_event(b->conn);
- } else {
-#ifdef HAVE_XCB_POLL_FOR_QUEUED_EVENT
+ else
*event = xcb_poll_for_queued_event(b->conn);
-#else
- *event = xcb_poll_for_event(b->conn);
-#endif
- }
return *event != NULL;
}