diff options
author | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-03-01 01:23:17 +0200 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-03-01 01:23:17 +0200 |
commit | 1a7ba1a8061c373cd66d15b3a1c8dfada92745ef (patch) | |
tree | 0003bd7906e38a3bde07c63e334010e33450a0c0 | |
parent | 5b7f4bb241f3191c1589cd714f373719efded56e (diff) |
xcb: Update minimum required versions of libxcb.
The new xcb surface uses xcb_writev() and xcb_take_socket()
which were introduced in libxcb 1.1.92. The boilerplate
in turn uses the major_code and minor_code fields in
xcb_generic_error_t, which were introduced in 1.4.
-rw-r--r-- | boilerplate/cairo-boilerplate-xcb.c | 6 | ||||
-rw-r--r-- | configure.ac | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/boilerplate/cairo-boilerplate-xcb.c b/boilerplate/cairo-boilerplate-xcb.c index ed173e68..0e5c3b94 100644 --- a/boilerplate/cairo-boilerplate-xcb.c +++ b/boilerplate/cairo-boilerplate-xcb.c @@ -564,9 +564,15 @@ _cairo_boilerplate_xcb_finish_surface (cairo_surface_t *surface) if (ev->response_type == 0 /* trust me! */) { xcb_generic_error_t *error = (xcb_generic_error_t *) ev; +#if XCB_GENERIC_ERROR_HAS_MAJOR_MINOR_CODES fprintf (stderr, "Detected error during xcb run: %d major=%d, minor=%d\n", error->error_code, error->major_code, error->minor_code); +#else + fprintf (stderr, + "Detected error during xcb run: %d\n", + error->error_code); +#endif free (error); status = CAIRO_STATUS_WRITE_ERROR; diff --git a/configure.ac b/configure.ac index 7d0cde0b..b483dd24 100644 --- a/configure.ac +++ b/configure.ac @@ -116,10 +116,13 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [ dnl =========================================================================== CAIRO_ENABLE_SURFACE_BACKEND(xcb, XCB, no, [ - xcb_REQUIRES="xcb >= 0.9.92 xcb-render >= 0.9.92" + xcb_REQUIRES="xcb >= 1.1.92 xcb-render >= 0.9.92" PKG_CHECK_MODULES(xcb, $xcb_REQUIRES, , [AC_MSG_RESULT(no) use_xcb="no (requires $xcb_REQUIRES http://xcb.freedesktop.org)"]) + if $PKG_CONFIG --atleast-version=1.4 xcb; then + CAIRO_CFLAGS="$CAIRO_CFLAGS -DXCB_GENERIC_ERROR_HAS_MAJOR_MINOR_CODES" + fi ]) CAIRO_ENABLE_FUNCTIONS(xlib_xcb, Xlib/XCB, no, [ |