pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1458ef
)
More stable blinking.
author
Christoph Lohmann
<20h@r-36.net>
Wed, 1 May 2013 11:14:46 +0000
(13:14 +0200)
committer
Christoph Lohmann
<20h@r-36.net>
Wed, 1 May 2013 11:14:46 +0000
(13:14 +0200)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
5095315
..
533fb0a
100644
(file)
--- 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;
}