Skip to content

Commit

Permalink
blur texture fades in / out with con
Browse files Browse the repository at this point in the history
  • Loading branch information
WillPower3309 committed Aug 23, 2023
1 parent a3c314d commit be2801e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sway/desktop/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@ enum corner_location get_rotated_corner(enum corner_location corner_location,

// TODO: don't need pointer
float get_animation_completion_percentage(struct sway_container *con) {
if (con->alpha < con->target_alpha) {
return con->alpha / con->target_alpha;
} else if (con->alpha > con->target_alpha) {
return con->alpha / con->max_alpha;
if (con->alpha == 1.0f) {
return 1.0f;
}
return 1;
return con->alpha < con->target_alpha ? con->alpha / con->target_alpha : con->alpha / con->max_alpha;
}

/**
Expand Down

0 comments on commit be2801e

Please sign in to comment.