summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--src/cairo-xcb-surface.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 488f4c0b..289fecba 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -16,6 +16,7 @@ Steve Chaplin <stevech1097@yahoo.com.au> Bug fixes for PNG reading
Tomasz Cholewo <cholewo@ieee-cis.org> Bug fixes
Manu Cornet <manu@manucornet.net> SVG build fix
Frederic Crozat <fcrozat@mandriva.com> Fix test suite for OPD platforms (IA64 or PPC64)
+Julien Danjou <julien@danjou.info> XCB fixes
Radek DoulĂ­k <rodo@novell.com> Bug report and test case
John Ehresman <jpe@wingide.com> Build fixes for win32
John Ellson <ellson@research.att.com> First font/glyph extents functions
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 6f246f80..2ae7dcf3 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -1735,7 +1735,8 @@ _cairo_xcb_surface_create_internal (xcb_connection_t *dpy,
int depth)
{
cairo_xcb_surface_t *surface;
- const xcb_render_query_version_reply_t *r;
+ const xcb_query_extension_reply_t *er;
+ const xcb_render_query_version_reply_t *r = NULL;
surface = malloc (sizeof (cairo_xcb_surface_t));
if (surface == NULL)
@@ -1767,7 +1768,10 @@ _cairo_xcb_surface_create_internal (xcb_connection_t *dpy,
;
}
- r = xcb_render_util_query_version(dpy);
+ er = xcb_get_extension_data(dpy, &xcb_render_id);
+ if(er && er->present) {
+ r = xcb_render_util_query_version(dpy);
+ }
if (r) {
surface->render_major = r->major_version;
surface->render_minor = r->minor_version;