From a7ab2b333812ff5619c9b95e8a6386a3ef99866a Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Fri, 27 Jul 2012 23:01:17 +0800 Subject: [PATCH] Fix check_conn to work with older libxcb versions. --- spectrwm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spectrwm.c b/spectrwm.c index 4c5974b..023613b 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -7407,6 +7407,7 @@ clientmessage(xcb_client_message_event_t *e) xcb_flush(conn); } +#ifdef XCB_CONN_ERROR void check_conn(void) { @@ -7436,6 +7437,14 @@ check_conn(void) if (err) errx(err, "X CONNECTION ERROR: %s", s); } +#else +void +check_conn(void) +{ + if (conn->has_error) + errx(err, "X CONNECTION ERROR"); +} +#endif int enable_wm(void) -- 1.7.10.4