aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'render.c')
-rw-r--r--render.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/render.c b/render.c
index 82abac4d..6f8aa6b5 100644
--- a/render.c
+++ b/render.c
@@ -994,6 +994,9 @@ grid_render(struct terminal *term)
wl_surface_attach(term->window->surface, buf->wl_buf, 0, 0);
pixman_image_t *pix = buf->pix;
+ pixman_region16_t clip;
+ pixman_region_init_rect(&clip, term->margins.left, term->margins.top, term->cols * term->cell_width, term->rows * term->cell_height);
+ pixman_image_set_clip_region(pix, &clip);
/* If we resized the window, or is flashing, or just stopped flashing */
if (term->render.last_buf != buf ||
@@ -1027,6 +1030,7 @@ grid_render(struct terminal *term)
if (term->is_searching)
pixman_color_dim(&bg);
+ pixman_image_set_clip_region(pix, NULL);
pixman_image_fill_rectangles(
PIXMAN_OP_SRC, pix, &bg, 4,
(pixman_rectangle16_t[]){
@@ -1034,6 +1038,7 @@ grid_render(struct terminal *term)
{0, 0, term->margins.left, term->height}, /* Left */
{rmargin, 0, term->margins.right, term->height}, /* Right */
{0, bmargin, term->width, term->margins.bottom}}); /* Bottom */
+ pixman_image_set_clip_region(pix, &clip);
wl_surface_damage_buffer(
term->window->surface, 0, 0, term->width, term->margins.top);