mirror of
https://github.com/yshui/picom.git
synced 2025-02-24 16:06:42 -05:00
Make this loop slightly easier to read.
This commit is contained in:
parent
fa689d8b38
commit
de60732aff
1 changed files with 4 additions and 2 deletions
|
@ -321,7 +321,7 @@ void
|
||||||
run_fades (Display *dpy)
|
run_fades (Display *dpy)
|
||||||
{
|
{
|
||||||
int now = get_time_in_milliseconds();
|
int now = get_time_in_milliseconds();
|
||||||
fade *f, *next;
|
fade *next = fades;
|
||||||
int steps;
|
int steps;
|
||||||
Bool need_dequeue;
|
Bool need_dequeue;
|
||||||
|
|
||||||
|
@ -331,8 +331,10 @@ run_fades (Display *dpy)
|
||||||
if (fade_time - now > 0)
|
if (fade_time - now > 0)
|
||||||
return;
|
return;
|
||||||
steps = 1 + (now - fade_time) / fade_delta;
|
steps = 1 + (now - fade_time) / fade_delta;
|
||||||
for (next = fades; f = next; )
|
|
||||||
|
while (next)
|
||||||
{
|
{
|
||||||
|
fade *f = next;
|
||||||
win *w = f->w;
|
win *w = f->w;
|
||||||
next = f->next;
|
next = f->next;
|
||||||
f->cur += f->step * steps;
|
f->cur += f->step * steps;
|
||||||
|
|
Loading…
Add table
Reference in a new issue