Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Clear framebuffer before drawing borders (#4308)
Browse files Browse the repository at this point in the history
Clear framebuffer before copying surface to prevent visual garbage

Fixes #3481
Corrects problems of #4280
  • Loading branch information
tbgiles committed Jan 3, 2021
1 parent d3d2612 commit 057a635
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/x.c
Expand Up @@ -535,6 +535,10 @@ void x_draw_decoration(Con *con) {
con->pixmap_recreated = false;
con->mark_changed = false;

/* Clear background before drawing. Clearing here makes sure we are in a
* state where we are expected to redraw the borders */
draw_util_clear_surface(&(con->frame_buffer), (color_t){.red = 0.0, .green = 0.0, .blue = 0.0});

/* 2: draw the client.background, but only for the parts around the window_rect */
if (con->window != NULL) {
/* top area */
Expand Down

0 comments on commit 057a635

Please sign in to comment.