summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cairo-xcb-surface.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 9b7eb4b7..c63e851e 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -1732,7 +1732,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)
@@ -1764,7 +1765,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;