diff options
| author | Steven Tamm | 2002-12-12 17:10:34 +0000 |
|---|---|---|
| committer | Steven Tamm | 2002-12-12 17:10:34 +0000 |
| commit | 96720f09ea540774b650385a2d56a789fadbe972 (patch) | |
| tree | ce31e82b138df861ed0a682385f581a5227fd869 /src | |
| parent | 2bfe1b7a8f6e2b2e00b9be9b4feb8ef347e40520 (diff) | |
| download | emacs-96720f09ea540774b650385a2d56a789fadbe972.tar.gz emacs-96720f09ea540774b650385a2d56a789fadbe972.zip | |
* macterm.c (mac_check_for_quit_char): Correctly set the
modifiers of the event to 0.
* mac.c (sys_select): Duplicate rfds before calling select to
ensure that rfds survive the while loop.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/mac.c | 18 | ||||
| -rw-r--r-- | src/macterm.c | 2 |
3 files changed, 23 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d05700302e9..24970fa927f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2002-12-12 Steven Tamm <steventamm@mac.com> | ||
| 2 | |||
| 3 | * macterm.c (mac_check_for_quit_char): Correctly set the | ||
| 4 | modifiers of the event to 0. | ||
| 5 | * mac.c (sys_select): Duplicate rfds before calling select to | ||
| 6 | ensure that rfds survive the while loop. | ||
| 7 | |||
| 1 | 2002-12-11 Kim F. Storm <storm@cua.dk> | 8 | 2002-12-11 Kim F. Storm <storm@cua.dk> |
| 2 | 9 | ||
| 3 | * xdisp.c (try_window_id): Don't call set_cursor_from_row if | 10 | * xdisp.c (try_window_id): Don't call set_cursor_from_row if |
| @@ -2776,7 +2776,7 @@ sys_select (n, rfds, wfds, efds, timeout) | |||
| 2776 | else | 2776 | else |
| 2777 | { | 2777 | { |
| 2778 | EMACS_TIME end_time, now; | 2778 | EMACS_TIME end_time, now; |
| 2779 | 2779 | ||
| 2780 | EMACS_GET_TIME (end_time); | 2780 | EMACS_GET_TIME (end_time); |
| 2781 | if (timeout) | 2781 | if (timeout) |
| 2782 | EMACS_ADD_TIME (end_time, end_time, *timeout); | 2782 | EMACS_ADD_TIME (end_time, end_time, *timeout); |
| @@ -2785,6 +2785,13 @@ sys_select (n, rfds, wfds, efds, timeout) | |||
| 2785 | { | 2785 | { |
| 2786 | int r; | 2786 | int r; |
| 2787 | EMACS_TIME one_second; | 2787 | EMACS_TIME one_second; |
| 2788 | SELECT_TYPE orfds; | ||
| 2789 | |||
| 2790 | FD_ZERO (&orfds); | ||
| 2791 | if (rfds) | ||
| 2792 | { | ||
| 2793 | orfds = *rfds; | ||
| 2794 | } | ||
| 2788 | 2795 | ||
| 2789 | EMACS_SET_SECS (one_second, 1); | 2796 | EMACS_SET_SECS (one_second, 1); |
| 2790 | EMACS_SET_USECS (one_second, 0); | 2797 | EMACS_SET_USECS (one_second, 0); |
| @@ -2792,9 +2799,12 @@ sys_select (n, rfds, wfds, efds, timeout) | |||
| 2792 | if (timeout && EMACS_TIME_LT(*timeout, one_second)) | 2799 | if (timeout && EMACS_TIME_LT(*timeout, one_second)) |
| 2793 | one_second = *timeout; | 2800 | one_second = *timeout; |
| 2794 | 2801 | ||
| 2795 | if ((r = select (n, rfds, wfds, efds, &one_second)) > 0) | 2802 | if ((r = select (n, &orfds, wfds, efds, &one_second)) > 0) |
| 2796 | return r; | 2803 | { |
| 2797 | 2804 | *rfds = orfds; | |
| 2805 | return r; | ||
| 2806 | } | ||
| 2807 | |||
| 2798 | mac_check_for_quit_char(); | 2808 | mac_check_for_quit_char(); |
| 2799 | 2809 | ||
| 2800 | EMACS_GET_TIME (now); | 2810 | EMACS_GET_TIME (now); |
diff --git a/src/macterm.c b/src/macterm.c index 0fb644222cb..d2299524362 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -13561,6 +13561,8 @@ mac_check_for_quit_char() | |||
| 13561 | /* Use an input_event to emulate what the interrupt handler does. */ | 13561 | /* Use an input_event to emulate what the interrupt handler does. */ |
| 13562 | e.kind = ASCII_KEYSTROKE_EVENT; | 13562 | e.kind = ASCII_KEYSTROKE_EVENT; |
| 13563 | e.code = quit_char; | 13563 | e.code = quit_char; |
| 13564 | e.arg = NULL; | ||
| 13565 | e.modifiers = NULL; | ||
| 13564 | e.timestamp = EventTimeToTicks(GetEventTime(event))*(1000/60); | 13566 | e.timestamp = EventTimeToTicks(GetEventTime(event))*(1000/60); |
| 13565 | XSETFRAME(e.frame_or_window, mwp->mFP); | 13567 | XSETFRAME(e.frame_or_window, mwp->mFP); |
| 13566 | /* Remove event from queue to prevent looping. */ | 13568 | /* Remove event from queue to prevent looping. */ |