diff options
| author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2012-01-21 23:26:53 +0100 |
|---|---|---|
| committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2012-01-21 23:26:53 +0100 |
| commit | df54ab040509829b4baec1673e4b158038ff983d (patch) | |
| tree | 8dd526d04f7fdcd6c9d24ef7a1fa3c10a2f5ef6f /st.c | |
| parent | copy dirty lines to screen, add select() timeout & min time between draw() ca... (diff) | |
| download | st-df54ab040509829b4baec1673e4b158038ff983d.tar.gz st-df54ab040509829b4baec1673e4b158038ff983d.zip | |
fix PRINT/DRAW _TIMEOUT and fix redrawing bug.
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1888,7 +1888,7 @@ expose(XEvent *ev) { | |||
| 1888 | if(xw.state & WIN_REDRAW) { | 1888 | if(xw.state & WIN_REDRAW) { |
| 1889 | if(!e->count) { | 1889 | if(!e->count) { |
| 1890 | xw.state &= ~WIN_REDRAW; | 1890 | xw.state &= ~WIN_REDRAW; |
| 1891 | draw(); | 1891 | xcopy(0, 0, term.col, term.row); |
| 1892 | } | 1892 | } |
| 1893 | } else | 1893 | } else |
| 1894 | XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, e->x-BORDER, e->y-BORDER, | 1894 | XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, e->x-BORDER, e->y-BORDER, |
| @@ -2028,7 +2028,7 @@ int | |||
| 2028 | last_draw_too_old(void) { | 2028 | last_draw_too_old(void) { |
| 2029 | struct timeval now; | 2029 | struct timeval now; |
| 2030 | gettimeofday(&now, NULL); | 2030 | gettimeofday(&now, NULL); |
| 2031 | return TIMEDIFF(now, xw.lastdraw) >= PRINT_TIMEOUT/1000; | 2031 | return TIMEDIFF(now, xw.lastdraw) >= DRAW_TIMEOUT/1000; |
| 2032 | } | 2032 | } |
| 2033 | 2033 | ||
| 2034 | void | 2034 | void |
