diff --git a/src/backend/xrender.c b/src/backend/xrender.c index 5c388eb..f7467ef 100644 --- a/src/backend/xrender.c +++ b/src/backend/xrender.c @@ -241,17 +241,17 @@ static void render_win(void *backend_data, session_t *ps, win *w, void *win_data w->pixmap_damaged = false; - region_t reg_paint_local; - pixman_region32_init(®_paint_local); - pixman_region32_copy(®_paint_local, (region_t *)reg_paint); - pixman_region32_translate(®_paint_local, -w->g.x, -w->g.y); - if (!w->invert_color && w->frame_opacity == 1 && !w->dim) { // No extra processing needed wd->rendered_pict = wd->pict; return; } + region_t reg_paint_local; + pixman_region32_init(®_paint_local); + pixman_region32_copy(®_paint_local, (region_t *)reg_paint); + pixman_region32_translate(®_paint_local, -w->g.x, -w->g.y); + // We don't want to modify the content of the original window when we process // it, so we create a buffer. if (wd->buffer == XCB_NONE) { @@ -325,6 +325,8 @@ static void render_win(void *backend_data, session_t *ps, win *w, void *win_data xcb_render_fill_rectangles(ps->c, XCB_RENDER_PICT_OP_OVER, wd->rendered_pict, color, 1, &rect); } + + pixman_region32_fini(®_paint_local); } static void *prepare_win(void *backend_data, session_t *ps, win *w) {