fixes animations on destroying/unmapping windows
This commit is contained in:
@@ -1051,7 +1051,7 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) {
|
||||
}
|
||||
|
||||
// Submit window size change
|
||||
if (size_changed && w->state != WSTATE_UNMAPPED && w->state != WSTATE_DESTROYING && w->state != WSTATE_UNMAPPING) {
|
||||
if (size_changed) {
|
||||
win_on_win_size_change(ps, w);
|
||||
|
||||
pixman_region32_clear(&w->bounding_shape);
|
||||
@@ -1059,8 +1059,10 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) {
|
||||
pixman_region32_init_rect(&w->bounding_shape, 0, 0,
|
||||
(uint)w->widthb, (uint)w->heightb);
|
||||
|
||||
win_clear_flags(w, WIN_FLAGS_PIXMAP_STALE);
|
||||
win_process_image_flags(ps, w);
|
||||
if (w->state != WSTATE_UNMAPPED && w->state != WSTATE_DESTROYING && w->state != WSTATE_UNMAPPING) {
|
||||
win_clear_flags(w, WIN_FLAGS_PIXMAP_STALE);
|
||||
win_process_image_flags(ps, w);
|
||||
}
|
||||
}
|
||||
// Mark new window region with damage
|
||||
if (was_painted && geometry_changed) {
|
||||
|
||||
10
src/win.c
10
src/win.c
@@ -485,7 +485,7 @@ static void init_animation(session_t *ps, struct managed_win *w) {
|
||||
static double *anim_x, *anim_y, *anim_w, *anim_h;
|
||||
enum open_window_animation animation;
|
||||
|
||||
|
||||
|
||||
animation = ps->o.animation_for_open_window;
|
||||
|
||||
if (w->window_type != WINTYPE_TOOLTIP &&
|
||||
@@ -1538,8 +1538,12 @@ void win_on_win_size_change(session_t *ps, struct managed_win *w) {
|
||||
w->state != WSTATE_UNMAPPING);
|
||||
|
||||
// Invalidate the shadow we built
|
||||
win_set_flags(w, WIN_FLAGS_IMAGES_STALE);
|
||||
win_release_mask(ps->backend_data, w);
|
||||
// Do not set flags if window is unmapping and animation is running
|
||||
if (w->state != WSTATE_UNMAPPED && w->state != WSTATE_DESTROYING &&
|
||||
w->state != WSTATE_UNMAPPING) {
|
||||
win_set_flags(w, WIN_FLAGS_IMAGES_STALE);
|
||||
win_release_mask(ps->backend_data, w);
|
||||
}
|
||||
ps->pending_updates = true;
|
||||
free_paint(ps, &w->shadow_paint);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user