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.
This commit is contained in:
M Joonas Pihlaja 2010-03-01 01:23:17 +02:00
parent 5b7f4bb241
commit 1a7ba1a806
2 changed files with 10 additions and 1 deletions

View file

@ -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;

View file

@ -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, [