--- st.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff -r c3514854da2a -r 6c47c6d6192b st.c --- a/st.c Mon Sep 03 21:52:21 2012 +0200 +++ b/st.c Mon Sep 03 21:52:34 2012 +0200 _AT_@ -54,6 +54,7 @@ #define SELECT_TIMEOUT (20*1000) /* 20 ms */ #define DRAW_TIMEOUT (20*1000) /* 20 ms */ +#define REDRAW_TIMEOUT (80*1000) /* 80 ms */ #define SERRNO strerror(errno) #define MIN(a, b) ((a) < (b) ? (a) : (b)) _AT_@ -238,6 +239,7 @@ static void die(const char*, ...); static void draw(void); +static void redraw(void); static void drawregion(int, int, int, int); static void execsh(void); static void sigchld(int); _AT_@ -1206,7 +1208,7 @@ mode = term.mode; MODBIT(term.mode,set, MODE_REVERSE); if (mode != term.mode) - draw(); + redraw(); break; case 7: MODBIT(term.mode, set, MODE_WRAP); _AT_@ -2030,6 +2032,14 @@ } void +redraw(void) { + struct timespec tv = {0, REDRAW_TIMEOUT * 1000}; + tfulldirt(); + draw(); + nanosleep(&tv, NULL); +} + +void draw() { drawregion(0, 0, term.col, term.row); xcopy();Received on Mon Sep 03 2012 - 21:55:47 CEST
This archive was generated by hypermail 2.3.0 : Mon Sep 03 2012 - 22:00:11 CEST