From 09e2bdaeba3d822143c1ae8fab3538cfbe9345d8 Mon Sep 17 00:00:00 2001 From: Tristan Giles Date: Sat, 30 Jan 2021 18:08:47 -0800 Subject: [PATCH] Clear framebuffer on containers that are visible windows --- RELEASE-NOTES-next | 1 + src/x.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES-next b/RELEASE-NOTES-next index 439fa9053..ed0a17502 100644 --- a/RELEASE-NOTES-next +++ b/RELEASE-NOTES-next @@ -31,3 +31,4 @@ strongly encouraged to upgrade. • i3bar: properly restart status command after config change • i3bar: exit with 1 when a wrong command line argument is used • fix commented-out rofi call in default i3 config + • clear pixmap before drawing to prevent visual garbage diff --git a/src/x.c b/src/x.c index 76679b9fb..c9ef07f7a 100644 --- a/src/x.c +++ b/src/x.c @@ -537,6 +537,9 @@ void x_draw_decoration(Con *con) { /* 2: draw the client.background, but only for the parts around the window_rect */ if (con->window != NULL) { + /* Clear visible windows before beginning to draw */ + draw_util_clear_surface(&(con->frame_buffer), (color_t){.red = 0.0, .green = 0.0, .blue = 0.0}); + /* top area */ draw_util_rectangle(&(con->frame_buffer), config.client.background, 0, 0, r->width, w->y);