Skip to content

Commit

Permalink
fixed con kill issue
Browse files Browse the repository at this point in the history
  • Loading branch information
WillPower3309 committed Aug 9, 2023
1 parent 27aa948 commit 54dc823
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sway/tree/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ static int animation_timer(void *data) {
for (int i = 0; i < con->outputs->length; ++i) {
struct sway_output *output = root->outputs->items[i];
fastest_output_refresh_ns = MAX(fastest_output_refresh_ns, output->refresh_nsec);

float alpha_step = config->animation_duration ?
(con->max_alpha * output->refresh_sec) / config->animation_duration : con->max_alpha;

con->alpha = con->alpha < con->target_alpha ? MIN(con->alpha + alpha_step, con->target_alpha)
: MAX(con->alpha - alpha_step, con->target_alpha);
}
if (con->alpha != con->target_alpha) {
wl_event_source_timer_update(con->animation_present_timer, fastest_output_refresh_ns / 1000000);
} else {
wl_event_source_remove(con->animation_present_timer);
}
container_damage_whole(con);

Expand Down

0 comments on commit 54dc823

Please sign in to comment.