From d9b407c6b409fa38411a62369291bc2a706436cc Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 17 Mar 2020 17:31:19 +0000 Subject: [PATCH] win: fix assertion failures in old backends These asserts only hold when using the experimental backends. Signed-off-by: Yuxuan Shui --- src/win.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/win.c b/src/win.c index 25d9367..d011514 100644 --- a/src/win.c +++ b/src/win.c @@ -731,13 +731,15 @@ static void win_set_shadow(session_t *ps, struct managed_win *w, bool shadow_new // asserting the existence of the shadow image. if (w->shadow) { // Mark the new extents as damaged if the shadow is added - assert(!w->shadow_image || (w->flags & WIN_FLAGS_SHADOW_STALE)); + assert(!w->shadow_image || (w->flags & WIN_FLAGS_SHADOW_STALE) || + !ps->o.experimental_backends); pixman_region32_clear(&extents); win_extents(w, &extents); add_damage_from_win(ps, w); } else { // Mark the old extents as damaged if the shadow is removed - assert(w->shadow_image || (w->flags & WIN_FLAGS_SHADOW_STALE)); + assert(w->shadow_image || (w->flags & WIN_FLAGS_SHADOW_STALE) || + !ps->o.experimental_backends); add_damage(ps, &extents); }