shadow fix

This commit is contained in:
Arda Atci
2023-02-04 15:39:40 +03:00
parent 157ecd2077
commit 90f57e9b1a
2 changed files with 8 additions and 9 deletions

View File

@@ -698,13 +698,13 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) {
w->animation_dest_center_y - w->animation_center_y;
double neg_displacement_w = w->animation_dest_w - w->animation_w;
double neg_displacement_h = w->animation_dest_h - w->animation_h;
double animation_stiffness = ps->o.animation_stiffness;
if (!(w->animation_is_tag & ANIM_IN_TAG)) {
if (w->animation_is_tag & ANIM_SLOW)
animation_stiffness = ps->o.animation_stiffness_tag_change;
else if (w->animation_is_tag & ANIM_FAST)
animation_stiffness = ps->o.animation_stiffness_tag_change * 1.5;
}
double animation_stiffness = ps->o.animation_stiffness;
if (!(w->animation_is_tag & ANIM_IN_TAG)) {
if (w->animation_is_tag & ANIM_SLOW)
animation_stiffness = ps->o.animation_stiffness_tag_change;
else if (w->animation_is_tag & ANIM_FAST)
animation_stiffness = ps->o.animation_stiffness_tag_change * 1.5;
}
if (w->state == WSTATE_FADING && !(w->animation_is_tag & ANIM_FADE))
w->opacity_target = win_calc_opacity_target(ps, w);
double acceleration_x =
@@ -842,7 +842,6 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) {
// We can't check for 1 here as sometimes 1 = 0.999999999999999
// in case of floating numbers
if (w->animation_progress >= 0.999999999) {
win_process_update_flags(ps, w);
w->animation_progress = 1;
w->animation_velocity_x = 0.0;
w->animation_velocity_y = 0.0;

View File

@@ -1466,7 +1466,7 @@ void win_on_factor_change(session_t *ps, struct managed_win *w) {
// focused state of the window
win_update_focused(ps, w);
if (w->animation_progress > 0.9999 || w->animation_progress < 0.0001) {
if (w->animation_progress > 0.99999999 || (w->animation_progress == 0.0 && ps->animation_time != 0L)) {
win_determine_shadow(ps, w);
win_determine_clip_shadow_above(ps, w);
}