More stable blinking.
Christoph Lohmann 20h@r-36.net
1 files changed,
9 insertions(+),
2 deletions(-)
jump to
M
st.c
→
st.c
@@ -3496,8 +3496,15 @@ if(xev && !FD_ISSET(xfd, &rfd))
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; }