Remove win::*_last

A side effect of this is that some window properties are allowed to
change during fade-in/out. (e.g. window background can become blurred
during window fade out if window properties changed so blur is requirired).
But it is unclear what is the expected behaviour in this case anyway, so we
choose the one that is simpler to implement.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-02-17 18:09:22 +00:00
parent ed4202b52f
commit 635351c820
3 changed files with 1 additions and 23 deletions

View File

@ -498,14 +498,6 @@ paint_preprocess(session_t *ps, win *list, bool *fade_running) {
const winmode_t mode_old = w->mode;
const bool was_painted = w->to_paint;
const opacity_t opacity_old = w->opacity;
// Restore flags from last paint if the window is being faded out
// TODO probably should just stop updating window flags when window
// is fading out
if (w->state == WSTATE_UNMAPPING || w->state == WSTATE_DESTROYING) {
win_set_shadow(ps, w, w->shadow_last);
win_set_invert_color(ps, w, w->invert_color_last);
win_set_blur_background(ps, w, w->blur_background_last);
}
if (win_should_dim(ps, w) != w->dim) {
w->dim = win_should_dim(ps, w);
@ -648,13 +640,6 @@ paint_preprocess(session_t *ps, win *list, bool *fade_running) {
// Avoid setting w->to_paint if w is freed
if (w) {
w->to_paint = to_paint;
if (w->to_paint) {
// Save flags
w->shadow_last = w->shadow;
w->invert_color_last = w->invert_color;
w->blur_background_last = w->blur_background;
}
}
}