mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
Make sure only MAPPED state can transition to FADING
win_update_focused transition window into FADING without checking their current state, resulting into unmapping windows being brought into FADING state and stops unmapping. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
9cce1efe3f
commit
8d639f41e9
1 changed files with 7 additions and 1 deletions
|
@ -970,8 +970,14 @@ void win_update_focused(session_t *ps, win *w) {
|
|||
// Always recalculate the window target opacity, since some opacity-related
|
||||
// options depend on the output value of win_is_focused_real() instead of
|
||||
// w->focused
|
||||
double opacity_tgt_old = w->opacity_tgt;
|
||||
w->opacity_tgt = win_calc_opacity_target(ps, w);
|
||||
w->state = WSTATE_FADING;
|
||||
if (opacity_tgt_old != w->opacity_tgt && w->state == WSTATE_MAPPED) {
|
||||
// Only MAPPED can transition to FADING
|
||||
assert(w->state != WSTATE_DESTROYING && w->state != WSTATE_UNMAPPING &&
|
||||
w->state != WSTATE_UNMAPPED);
|
||||
w->state = WSTATE_FADING;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue