From b92182416c3a8c025ab21571d1b989a986c6846f Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 23 Feb 2019 00:18:12 +0000 Subject: [PATCH] Don't stop fading for window size change Window size change cause window resource to be released and re-acquired, so it cannot work on unmapped windows. Previously we make sure of that by skipping fading and change if the window is mapped. Now we just make sure that functino is never called with an unmapped window. Signed-off-by: Yuxuan Shui --- src/win.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/win.c b/src/win.c index fdad309..c69365f 100644 --- a/src/win.c +++ b/src/win.c @@ -617,13 +617,13 @@ void win_on_win_size_change(session_t *ps, win *w) { w->flags |= WFLAG_SIZE_CHANGE; // Invalidate the shadow we built if (ps->o.experimental_backends) { - win_skip_fading(ps, &w); - if (!w) { - return; - } - if (w->state == WSTATE_MAPPED) { + if (w->state == WSTATE_MAPPED || + w->state == WSTATE_MAPPING || + w->state == WSTATE_FADING) { backend_list[ps->o.backend]->release_win(ps->backend_data, ps, w, w->win_data); w->win_data = backend_list[ps->o.backend]->prepare_win(ps->backend_data, ps, w); + } else { + assert(false); } } else { free_paint(ps, &w->shadow_paint);