diff --git a/src/backend/backend.c b/src/backend/backend.c index 59ddcaf2..3543ee12 100644 --- a/src/backend/backend.c +++ b/src/backend/backend.c @@ -81,7 +81,7 @@ void handle_device_reset(session_t *ps) { } /// paint all windows -void paint_all_new(session_t *ps, struct managed_win *t, bool ignore_damage) { +void paint_all_new(session_t *ps, struct managed_win *t) { if (ps->backend_data->ops->device_status && ps->backend_data->ops->device_status(ps->backend_data) != DEVICE_STATUS_NORMAL) { return handle_device_reset(ps); @@ -100,12 +100,7 @@ void paint_all_new(session_t *ps, struct managed_win *t, bool ignore_damage) { // the paints bleed out of the damage region, it will destroy // part of the image we want to reuse region_t reg_damage; - if (!ignore_damage) { - reg_damage = get_damage(ps, ps->o.monitor_repaint || !ps->o.use_damage); - } else { - pixman_region32_init(®_damage); - pixman_region32_copy(®_damage, &ps->screen_reg); - } + reg_damage = get_damage(ps, ps->o.monitor_repaint || !ps->o.use_damage); if (!pixman_region32_not_empty(®_damage)) { pixman_region32_fini(®_damage); diff --git a/src/backend/backend.h b/src/backend/backend.h index b34b96d5..ef1bcb88 100644 --- a/src/backend/backend.h +++ b/src/backend/backend.h @@ -363,5 +363,4 @@ struct backend_operations { extern struct backend_operations *backend_list[]; -void paint_all_new(session_t *ps, struct managed_win *const t, bool ignore_damage) - attr_nonnull(1); +void paint_all_new(session_t *ps, struct managed_win *const t) attr_nonnull(1); diff --git a/src/picom.c b/src/picom.c index 8a7a9670..d31c6634 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1524,9 +1524,9 @@ static void draw_callback_impl(EV_P_ session_t *ps, int revents attr_unused) { log_trace("Render start, frame %d", paint); if (!ps->o.legacy_backends) { - paint_all_new(ps, bottom, false); + paint_all_new(ps, bottom); } else { - paint_all(ps, bottom, false); + paint_all(ps, bottom); } log_trace("Render end"); diff --git a/src/render.c b/src/render.c index afde7db8..80cb59a6 100644 --- a/src/render.c +++ b/src/render.c @@ -969,7 +969,7 @@ win_blur_background(session_t *ps, struct managed_win *w, xcb_render_picture_t t /// paint all windows /// region = ?? /// region_real = the damage region -void paint_all(session_t *ps, struct managed_win *t, bool ignore_damage) { +void paint_all(session_t *ps, struct managed_win *t) { if (ps->o.xrender_sync_fence || (ps->drivers & DRIVER_NVIDIA)) { if (ps->xsync_exists && !x_fence_sync(ps->c, ps->sync_fence)) { log_error("x_fence_sync failed, xrender-sync-fence will be " @@ -984,7 +984,7 @@ void paint_all(session_t *ps, struct managed_win *t, bool ignore_damage) { region_t region; pixman_region32_init(®ion); int buffer_age = get_buffer_age(ps); - if (buffer_age == -1 || buffer_age > ps->ndamage || ignore_damage) { + if (buffer_age == -1 || buffer_age > ps->ndamage) { pixman_region32_copy(®ion, &ps->screen_reg); } else { for (int i = 0; i < get_buffer_age(ps); i++) { diff --git a/src/render.h b/src/render.h index 95a46dbe..249f7bf2 100644 --- a/src/render.h +++ b/src/render.h @@ -37,7 +37,7 @@ void render(session_t *ps, int x, int y, int dx, int dy, int w, int h, int fullw const glx_prog_main_t *pprogram, clip_t *clip); void paint_one(session_t *ps, struct managed_win *w, const region_t *reg_paint); -void paint_all(session_t *ps, struct managed_win *const t, bool ignore_damage); +void paint_all(session_t *ps, struct managed_win *const t); void free_picture(xcb_connection_t *c, xcb_render_picture_t *p);