From 51dec651f4f0a4fce9a708360d759574d5dddcc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 10 May 2021 17:56:12 +0200 Subject: [PATCH] =?UTF-8?q?render:=20add=20margins=20to=20buffer=E2=80=99s?= =?UTF-8?q?=20dirty=20region=20when=20rendering=20margins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- render.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/render.c b/render.c index a7297412..d9cd1bca 100644 --- a/render.c +++ b/render.c @@ -759,6 +759,18 @@ render_margin(struct terminal *term, struct buffer *buf, if (term->render.urgency) render_urgency(term, buf); + /* Ensure the updated regions are copied to the next frame's + * buffer when we're double buffering */ + pixman_region32_union_rect( + &buf->dirty, &buf->dirty, 0, 0, term->width, term->margins.top); + pixman_region32_union_rect( + &buf->dirty, &buf->dirty, 0, bmargin, term->width, term->margins.bottom); + pixman_region32_union_rect( + &buf->dirty, &buf->dirty, 0, 0, term->margins.left, term->height); + pixman_region32_union_rect( + &buf->dirty, &buf->dirty, + rmargin, 0, term->margins.right, term->height); + if (apply_damage) { /* Top */ wl_surface_damage_buffer(