x: fix CI build failure

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2022-12-14 13:57:09 +00:00
committed by Arda Atci
parent 57956fb219
commit fe3f53f3a4

View File

@@ -394,7 +394,10 @@ uint32_t x_create_region(xcb_connection_t *c, const region_t *reg) {
} }
int nrects; int nrects;
auto rects = pixman_region32_rectangles(reg, &nrects); // In older pixman versions, pixman_region32_rectangles doesn't take const
// region_t, instead of dealing with this version difference, just suppress the
// warning.
const pixman_box32_t *rects = pixman_region32_rectangles((region_t *)reg, &nrects);
auto xrects = ccalloc(nrects, xcb_rectangle_t); auto xrects = ccalloc(nrects, xcb_rectangle_t);
for (int i = 0; i < nrects; i++) { for (int i = 0; i < nrects; i++) {
xrects[i] = xrects[i] =