Skip to content

Commit

Permalink
Corrected fix applied before.
Browse files Browse the repository at this point in the history
  • Loading branch information
pijulius authored Sep 23, 2021
1 parent ff68ea6 commit b9f05c0
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,10 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) {
// changes (if there are any).

struct win_geometry old_g = w->g;
new_animation_x =
(int16_t)round(w->animation_center_x - w->animation_w * 0.5);
new_animation_y =
(int16_t)round(w->animation_center_y - w->animation_h * 0.5);
new_animation_w = (uint16_t)round(w->animation_w);
new_animation_h = (uint16_t)round(w->animation_h);
new_animation_x = round(w->animation_center_x - w->animation_w * 0.5);
new_animation_y = round(w->animation_center_y - w->animation_h * 0.5);
new_animation_w = round(w->animation_w);
new_animation_h = round(w->animation_h);

bool position_changed =
new_animation_x != old_g.x || new_animation_y != old_g.y;
Expand All @@ -731,10 +729,10 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) {
if (w->to_paint && geometry_changed)
add_damage_from_win(ps, w);

w->g.x = (int16_t)round(w->animation_center_x - w->animation_w * 0.5);
w->g.y = (int16_t)round(w->animation_center_y - w->animation_h * 0.5);
w->g.width = (uint16_t)round(w->animation_w);
w->g.height = (uint16_t)round(w->animation_h);
w->g.x = (int16_t)new_animation_x;
w->g.y = (int16_t)new_animation_y;
w->g.width = (uint16_t)new_animation_w;
w->g.height = (uint16_t)new_animation_h;

// Submit window size change
if (size_changed) {
Expand Down

0 comments on commit b9f05c0

Please sign in to comment.