Clear framebuffer before copying surface to prevent visual garbage

Fixes #3481
This commit is contained in:
Tristan Giles
2020-12-07 19:35:54 -08:00
committed by Orestis Floros
parent 8d0b8b59c4
commit 337dd653ae
2 changed files with 2 additions and 0 deletions

View File

@ -22,3 +22,4 @@ strongly encouraged to upgrade.
• when initializing new outputs, avoid duplicating workspace numbers
• fix workspaces not moving to assigned output after output becomes available
• fix duplicate bindcode after i3-config-wizard
• clear pixmap before drawing to prevent visual grabage in clients using 'Shape'

View File

@ -706,6 +706,7 @@ void x_draw_decoration(Con *con) {
x_draw_decoration_after_title(con, p);
copy_pixmaps:
draw_util_clear_surface(&(con->frame_buffer), (color_t){.red = 0.0, .green = 0.0, .blue = 0.0});
draw_util_copy_surface(&(con->frame_buffer), &(con->frame), 0, 0, 0, 0, con->rect.width, con->rect.height);
}