mirror of https://github.com/yshui/picom.git
win: clear SHADOW_STALE in destroy_win_start
Clear both STALE flags (`IMAGES_STALE = PIXMAP_STALE | SHADOW_STALE`)
when destroying windows (see f493447b33
).
Clearing `SHADOW_STALE` as well should eliminate the recreation of a shadow
image for a window currently being destroyed which will cause the
rendering to fail because we can't properly update the flags anymore.
Should fix: #394
This commit is contained in:
parent
f53fbdccca
commit
1a720edbad
10
src/win.c
10
src/win.c
|
@ -2030,10 +2030,14 @@ bool destroy_win_start(session_t *ps, struct win *w) {
|
|||
}
|
||||
|
||||
if (w->managed) {
|
||||
// Clear PIXMAP_STALE flag, since the window is destroyed there is no
|
||||
// pixmap available so STALE doesn't make sense.
|
||||
// Clear IMAGES_STALE flags since the window is destroyed: Clear
|
||||
// PIXMAP_STALE as there is no pixmap available anymore, so STALE doesn't
|
||||
// make sense.
|
||||
// XXX Clear SHADOW_STALE as setting/clearing flags on a destroyed window
|
||||
// doesn't work leading to an inconsistent state where the shadow is
|
||||
// refreshed but the flags are stuck in STALE.
|
||||
// Do this before changing the window state to destroying
|
||||
win_clear_flags(mw, WIN_FLAGS_PIXMAP_STALE);
|
||||
win_clear_flags(mw, WIN_FLAGS_IMAGES_STALE);
|
||||
|
||||
// Update state flags of a managed window
|
||||
mw->state = WSTATE_DESTROYING;
|
||||
|
|
Loading…
Reference in New Issue