X-Git-Url: https://jasonwoof.com/gitweb/?p=st.git;a=blobdiff_plain;f=st.c;h=533fb0aa03a9f59eb0827b556094312936c7db79;hp=509531533f2f37769958bceb246d256e480d3129;hb=8618386de947a1e2d0b449d6f60fde478e931ecb;hpb=e1458ef467f1164fa3ca51e64e3c768c8c69b346 diff --git a/st.c b/st.c index 5095315..533fb0a 100644 --- 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; }