diff --git a/src/backend/backend.c b/src/backend/backend.c index d3b4ed5..bfdd02b 100644 --- a/src/backend/backend.c +++ b/src/backend/backend.c @@ -71,7 +71,7 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) { // TODO Bind root pixmap if (ps->backend_data->ops->prepare) { - ps->backend_data->ops->prepare(ps->backend_data, ®_visible); + ps->backend_data->ops->prepare(ps->backend_data, ®_damage); } if (ps->root_image) { diff --git a/src/backend/backend.h b/src/backend/backend.h index 8aef82c..03edbf5 100644 --- a/src/backend/backend.h +++ b/src/backend/backend.h @@ -67,8 +67,8 @@ struct backend_operations { /// Usually the backend should clear the buffer, or paint a background /// on the buffer (usually the wallpaper). /// - /// Optional? - void (*prepare)(backend_t *backend_data, const region_t *reg_paint); + /// Optional + void (*prepare)(backend_t *backend_data, const region_t *reg_damage); /** * Paint the content of an image onto the (possibly buffered) diff --git a/src/backend/xrender.c b/src/backend/xrender.c index d0b2d06..51382b3 100644 --- a/src/backend/xrender.c +++ b/src/backend/xrender.c @@ -260,18 +260,6 @@ static void deinit(backend_t *backend_data) { free(xd); } -static void prepare(backend_t *base, const region_t *reg_paint) { - struct _xrender_data *xd = (void *)base; - - // Paint the root pixmap (i.e. wallpaper) - // Limit the paint area - x_set_picture_clip_region(base->c, xd->back[xd->curr_back], 0, 0, reg_paint); - - xcb_render_composite(base->c, XCB_RENDER_PICT_OP_SRC, xd->root_pict, XCB_NONE, - xd->back[xd->curr_back], 0, 0, 0, 0, 0, 0, xd->target_width, - xd->target_height); -} - static void present(backend_t *base) { struct _xrender_data *xd = (void *)base; @@ -457,7 +445,6 @@ static struct backend_operations xrender_ops = { .deinit = deinit, .blur = blur, .present = present, - .prepare = prepare, .compose = compose, .bind_pixmap = bind_pixmap, .release_image = release_image,