diff --git a/src/backend/backend_common.c b/src/backend/backend_common.c index 177d372221..dacc68fd93 100644 --- a/src/backend/backend_common.c +++ b/src/backend/backend_common.c @@ -197,7 +197,7 @@ xcb_image_t *make_shadow(struct x_connection *c, const conv *kernel, double opac */ bool build_shadow(struct x_connection *c, double opacity, const int width, const int height, const conv *kernel, xcb_render_picture_t shadow_pixel, - xcb_pixmap_t *pixmap, xcb_render_picture_t *pict) { + xcb_pixmap_t *pixmap) { xcb_image_t *shadow_image = NULL; xcb_pixmap_t shadow_pixmap = XCB_NONE, shadow_pixmap_argb = XCB_NONE; xcb_render_picture_t shadow_picture = XCB_NONE, shadow_picture_argb = XCB_NONE; @@ -262,12 +262,12 @@ bool build_shadow(struct x_connection *c, double opacity, const int width, shadow_image->height); *pixmap = shadow_pixmap_argb; - *pict = shadow_picture_argb; xcb_free_gc(c->c, gc); xcb_image_destroy(shadow_image); xcb_free_pixmap(c->c, shadow_pixmap); x_free_picture(c, shadow_picture); + x_free_picture(c, shadow_picture_argb); return true; diff --git a/src/backend/backend_common.h b/src/backend/backend_common.h index 0bab860763..b531340787 100644 --- a/src/backend/backend_common.h +++ b/src/backend/backend_common.h @@ -28,8 +28,7 @@ struct dual_kawase_params { xcb_image_t *make_shadow(struct x_connection *c, const conv *kernel, double opacity, int width, int height); bool build_shadow(struct x_connection *, double opacity, int width, int height, - const conv *kernel, xcb_render_picture_t shadow_pixel, - xcb_pixmap_t *pixmap, xcb_render_picture_t *pict); + const conv *kernel, xcb_render_picture_t shadow_pixel, xcb_pixmap_t *pixmap); xcb_render_picture_t solid_picture(struct x_connection *, bool argb, double a, double r, double g, double b); diff --git a/src/renderer/renderer.c b/src/renderer/renderer.c index 4531351213..0f5e18a5ed 100644 --- a/src/renderer/renderer.c +++ b/src/renderer/renderer.c @@ -351,10 +351,8 @@ static bool renderer_bind_shadow(struct renderer *r, struct backend_base *backend, struct win *w) { if (backend->ops.quirks(backend) & BACKEND_QUIRK_SLOW_BLUR) { xcb_pixmap_t shadow = XCB_NONE; - xcb_render_picture_t pict = XCB_NONE; - if (!build_shadow(backend->c, r->shadow_color.alpha, w->widthb, w->heightb, - (void *)r->shadow_kernel, r->shadow_pixel, &shadow, &pict)) { + (void *)r->shadow_kernel, r->shadow_pixel, &shadow)) { return false; }