aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2013-05-01 13:14:46 +0200
committerChristoph Lohmann <20h@r-36.net>2013-05-01 13:14:46 +0200
commit8618386de947a1e2d0b449d6f60fde478e931ecb (patch)
treed2541bf11bd4d82601a30563057adab44a24f2e3
parente1458ef467f1164fa3ca51e64e3c768c8c69b346 (diff)
downloadst-8618386de947a1e2d0b449d6f60fde478e931ecb.tar.gz
st-8618386de947a1e2d0b449d6f60fde478e931ecb.zip
More stable blinking.
-rw-r--r--st.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/st.c b/st.c
index 5095315..533fb0a 100644
--- a/st.c
+++ b/st.c
@@ -3496,8 +3496,15 @@ run(void) {
3496 xev--; 3496 xev--;
3497 if(!FD_ISSET(cmdfd, &rfd) && !FD_ISSET(xfd, &rfd)) { 3497 if(!FD_ISSET(cmdfd, &rfd) && !FD_ISSET(xfd, &rfd)) {
3498 if(blinkset) { 3498 if(blinkset) {
3499 drawtimeout.tv_usec = 1000 * \ 3499 if(TIMEDIFF(now, lastblink) \
3500 blinktimeout; 3500 > blinktimeout) {
3501 drawtimeout.tv_usec = 1;
3502 } else {
3503 drawtimeout.tv_usec = (1000 * \
3504 (blinktimeout - \
3505 TIMEDIFF(now,
3506 lastblink)));
3507 }
3501 } else { 3508 } else {
3502 tv = NULL; 3509 tv = NULL;
3503 } 3510 }