aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-10-24 12:47:59 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-11-11 23:11:17 +0000
commitfeb56912409d8208253942e48bcd861400f32172 (patch)
tree329150ad3666245e5ab330fd9ad2e9a3774c441e /backend/x11
parent8bbe8624dfdb4fbf120aee3dd6f0f8eeeed3bf7e (diff)
backend: remove const casts for pixman_region32_t
Pixman 0.42.0 has constified APIs for pixman_region32_t. We no longer need the casts.
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/output.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index 05d53a43..7ea0459a 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -283,11 +283,10 @@ static bool output_commit_buffer(struct wlr_x11_output *output,
xcb_xfixes_region_t region = XCB_NONE;
if (state->committed & WLR_OUTPUT_STATE_DAMAGE) {
- pixman_region32_union(&output->exposed, &output->exposed,
- (pixman_region32_t *) &state->damage);
+ pixman_region32_union(&output->exposed, &output->exposed, &state->damage);
int rects_len = 0;
- pixman_box32_t *rects = pixman_region32_rectangles(&output->exposed, &rects_len);
+ const pixman_box32_t *rects = pixman_region32_rectangles(&output->exposed, &rects_len);
xcb_rectangle_t *xcb_rects = calloc(rects_len, sizeof(xcb_rectangle_t));
if (!xcb_rects) {
@@ -295,7 +294,7 @@ static bool output_commit_buffer(struct wlr_x11_output *output,
}
for (int i = 0; i < rects_len; i++) {
- pixman_box32_t *box = &rects[i];
+ const pixman_box32_t *box = &rects[i];
xcb_rects[i] = (struct xcb_rectangle_t){
.x = box->x1,
.y = box->y1,