compositor-x11: Only use xcb_poll_for_queued_event if we have it

Otherwise we can just fall back to xcb_poll_for_event, and just do a
harmless read on the socket.
This commit is contained in:
Kristian Høgsberg
2011-04-25 15:41:59 -04:00
parent b5819dc61d
commit 82ed0423a1
2 changed files with 13 additions and 0 deletions
+4
View File
@@ -383,7 +383,11 @@ x11_compositor_next_event(struct x11_compositor *c,
if (mask & WL_EVENT_READABLE) {
*event = xcb_poll_for_event(c->conn);
} else {
#ifdef HAVE_XCB_POLL_FOR_QUEUED_EVENT
*event = xcb_poll_for_queued_event(c->conn);
#else
*event = xcb_poll_for_event(c->conn);
#endif
}
return *event != NULL;