From 9bb2fa44d4bf6970cc9131c4ecea87a2588510af Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 17 Mar 2019 03:04:23 +0000 Subject: [PATCH] core: ignore window with IMAGE_ERRORs window with IMAGE_ERROR might not have an image data attached, so ignore them during paint. Signed-off-by: Yuxuan Shui --- src/compton.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compton.c b/src/compton.c index 23e58c1..2e2e781 100644 --- a/src/compton.c +++ b/src/compton.c @@ -511,8 +511,13 @@ static win *paint_preprocess(session_t *ps, bool *fade_running) { if (!w->ever_damaged || w->g.x + w->g.width < 1 || w->g.y + w->g.height < 1 || w->g.x >= ps->root_width || w->g.y >= ps->root_height || w->state == WSTATE_UNMAPPED || - (double)w->opacity * MAX_ALPHA < 1 || w->paint_excluded) + (double)w->opacity * MAX_ALPHA < 1 || w->paint_excluded) { to_paint = false; + } + + if ((w->flags & WIN_FLAGS_IMAGE_ERROR) != 0) { + to_paint = false; + } // log_trace("%s %d %d %d", w->name, to_paint, w->opacity, // w->paint_excluded);