mirror of
https://github.com/alrayyes/st.git
synced 2024-11-22 19:26:22 +00:00
More stable blinking.
This commit is contained in:
parent
e1458ef467
commit
8618386de9
1 changed files with 9 additions and 2 deletions
11
st.c
11
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue