diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ce32656822a..bb6859cf6a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2001-03-06 Kenichi Handa <handa@etl.go.jp> | ||
| 2 | |||
| 3 | * xterm.c (XTflash): Make the timeout of select shorter, and call | ||
| 4 | select repeatedly until the desired time expires. | ||
| 5 | |||
| 1 | 2001-03-06 Gerd Moellmann <gerd@gnu.org> | 6 | 2001-03-06 Gerd Moellmann <gerd@gnu.org> |
| 2 | 7 | ||
| 3 | * w32fns.c (Fx_create_frame): Clear Vwindow_list. | 8 | * w32fns.c (Fx_create_frame): Clear Vwindow_list. |
diff --git a/src/xterm.c b/src/xterm.c index fc09897de01..ae786d5058b 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -5437,18 +5437,23 @@ XTflash (f) | |||
| 5437 | wakeup.tv_sec += (wakeup.tv_usec / 1000000); | 5437 | wakeup.tv_sec += (wakeup.tv_usec / 1000000); |
| 5438 | wakeup.tv_usec %= 1000000; | 5438 | wakeup.tv_usec %= 1000000; |
| 5439 | 5439 | ||
| 5440 | /* Keep waiting until past the time wakeup. */ | 5440 | /* Keep waiting until past the time wakeup or any input gets |
| 5441 | while (1) | 5441 | available. */ |
| 5442 | while (! detect_input_pending ()) | ||
| 5442 | { | 5443 | { |
| 5444 | struct timeval current; | ||
| 5443 | struct timeval timeout; | 5445 | struct timeval timeout; |
| 5444 | 5446 | ||
| 5445 | EMACS_GET_TIME (timeout); | 5447 | EMACS_GET_TIME (current); |
| 5446 | 5448 | ||
| 5447 | /* In effect, timeout = wakeup - timeout. | 5449 | /* Break if result would be negative. */ |
| 5448 | Break if result would be negative. */ | 5450 | if (timeval_subtract (¤t, wakeup, current)) |
| 5449 | if (timeval_subtract (&timeout, wakeup, timeout)) | ||
| 5450 | break; | 5451 | break; |
| 5451 | 5452 | ||
| 5453 | /* How long `select' should wait. */ | ||
| 5454 | timeout.tv_sec = 0; | ||
| 5455 | timeout.tv_usec = 10000; | ||
| 5456 | |||
| 5452 | /* Try to wait that long--but we might wake up sooner. */ | 5457 | /* Try to wait that long--but we might wake up sooner. */ |
| 5453 | select (0, NULL, NULL, NULL, &timeout); | 5458 | select (0, NULL, NULL, NULL, &timeout); |
| 5454 | } | 5459 | } |