diff options
author | Christoph Lohmann | 2013-05-01 13:14:46 +0200 |
---|---|---|
committer | Christoph Lohmann | 2013-05-01 13:14:46 +0200 |
commit | dde4c26583f5557df889d399d5e52ee718613aab (patch) | |
tree | 41c01ae6d8f057cbf08118ec7d72284bbc94faeb /st.c | |
parent | e7fc0a15f7e052524fe6e777596f315647191477 (diff) | |
download | aur-dde4c26583f5557df889d399d5e52ee718613aab.tar.gz |
More stable blinking.
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; } |