From 337dd653ae60cfb2f61bf080618c60164b30acdf Mon Sep 17 00:00:00 2001 From: Tristan Giles Date: Mon, 7 Dec 2020 19:35:54 -0800 Subject: [PATCH] Clear framebuffer before copying surface to prevent visual garbage Fixes #3481 --- RELEASE-NOTES-next | 1 + src/x.c | 1 + 2 files changed, 2 insertions(+) diff --git a/RELEASE-NOTES-next b/RELEASE-NOTES-next index 1eec3658..87b6660a 100644 --- a/RELEASE-NOTES-next +++ b/RELEASE-NOTES-next @@ -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' diff --git a/src/x.c b/src/x.c index 48af5f37..cf5477ab 100644 --- a/src/x.c +++ b/src/x.c @@ -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); }