Fix compilation of xcbgrab if xcb/shape.h is not available.

Old versions of libxcb do not provide xcb_shape_rectangles().
The issue can be fixed differently but this small change fixes
some fate platforms and a user reported compilation problem.

Reported and tested by trac user kevmitch.
Fixes ticket #4067.
This commit is contained in:
Carl Eugen Hoyos 2014-10-30 10:22:34 +01:00
parent 8c0ae9015a
commit 792f0f2045
1 changed files with 2 additions and 0 deletions

View File

@ -580,11 +580,13 @@ static void setup_window(AVFormatContext *s)
XCB_COPY_FROM_PARENT, XCB_COPY_FROM_PARENT,
mask, values); mask, values);
#if XCB_SHAPE_RECTANGLES
xcb_shape_rectangles(c->conn, XCB_SHAPE_SO_SUBTRACT, xcb_shape_rectangles(c->conn, XCB_SHAPE_SO_SUBTRACT,
XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
c->window, c->window,
c->region_border, c->region_border, c->region_border, c->region_border,
1, &rect); 1, &rect);
#endif
xcb_map_window(c->conn, c->window); xcb_map_window(c->conn, c->window);