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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-02-23 00:18:12 +00:00
parent 1005e61553
commit b92182416c
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 5 additions and 5 deletions

View File

@ -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);