st

My fork of st.
git clone git://git.alex.balgavy.eu/st.git
Log | Files | Refs | README | LICENSE

commit 8618386de947a1e2d0b449d6f60fde478e931ecb
parent e1458ef467f1164fa3ca51e64e3c768c8c69b346
Author: Christoph Lohmann <20h@r-36.net>
Date:   Wed,  1 May 2013 13:14:46 +0200

More stable blinking.

Diffstat:
Mst.c | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/st.c b/st.c @@ -3496,8 +3496,15 @@ run(void) { xev--; if(!FD_ISSET(cmdfd, &rfd) && !FD_ISSET(xfd, &rfd)) { if(blinkset) { - drawtimeout.tv_usec = 1000 * \ - blinktimeout; + if(TIMEDIFF(now, lastblink) \ + > blinktimeout) { + drawtimeout.tv_usec = 1; + } else { + drawtimeout.tv_usec = (1000 * \ + (blinktimeout - \ + TIMEDIFF(now, + lastblink))); + } } else { tv = NULL; }