diff options
| author | Andrew Choi | 2002-05-04 13:31:56 +0000 |
|---|---|---|
| committer | Andrew Choi | 2002-05-04 13:31:56 +0000 |
| commit | c7764932ff619396f10ba8febd414fc8a627f9df (patch) | |
| tree | 659658638a53e4c71b7114b6dfe7dbea31c30ddf /src/macterm.c | |
| parent | 9a9c123f837fa44d580396c54fe69c9fc4e3e7f1 (diff) | |
| download | emacs-c7764932ff619396f10ba8febd414fc8a627f9df.tar.gz emacs-c7764932ff619396f10ba8febd414fc8a627f9df.zip | |
2002-05-04 Andrew Choi <akochoi@shaw.ca>
* macterm.c (XTread_socket): Call WaitNextEvent once instead of
repeatedly.
Diffstat (limited to 'src/macterm.c')
| -rw-r--r-- | src/macterm.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/macterm.c b/src/macterm.c index 4e3dc93d7ce..5fb67a9a588 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -12301,7 +12301,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12301 | if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) | 12301 | if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) |
| 12302 | event_mask -= highLevelEventMask; | 12302 | event_mask -= highLevelEventMask; |
| 12303 | 12303 | ||
| 12304 | while (WaitNextEvent (event_mask, &er, 0L, NULL) && numchars > 0) | 12304 | if (WaitNextEvent (event_mask, &er, (expected ? app_sleep_time : 0L), NULL)) |
| 12305 | switch (er.what) | 12305 | switch (er.what) |
| 12306 | { | 12306 | { |
| 12307 | case mouseDown: | 12307 | case mouseDown: |
| @@ -12339,8 +12339,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12339 | mouse_tracking_in_progress = mouse_tracking_none; | 12339 | mouse_tracking_in_progress = mouse_tracking_none; |
| 12340 | tracked_scroll_bar = NULL; | 12340 | tracked_scroll_bar = NULL; |
| 12341 | count++; | 12341 | count++; |
| 12342 | bufp++; | ||
| 12343 | numchars--; | ||
| 12344 | break; | 12342 | break; |
| 12345 | } | 12343 | } |
| 12346 | 12344 | ||
| @@ -12356,8 +12354,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12356 | bufp->kind = menu_bar_activate_event; | 12354 | bufp->kind = menu_bar_activate_event; |
| 12357 | XSETFRAME (bufp->frame_or_window, f); | 12355 | XSETFRAME (bufp->frame_or_window, f); |
| 12358 | count++; | 12356 | count++; |
| 12359 | bufp++; | ||
| 12360 | numchars--; | ||
| 12361 | } | 12357 | } |
| 12362 | break; | 12358 | break; |
| 12363 | 12359 | ||
| @@ -12437,8 +12433,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12437 | } | 12433 | } |
| 12438 | 12434 | ||
| 12439 | count++; | 12435 | count++; |
| 12440 | bufp++; | ||
| 12441 | numchars--; | ||
| 12442 | } | 12436 | } |
| 12443 | break; | 12437 | break; |
| 12444 | 12438 | ||
| @@ -12462,8 +12456,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12462 | XSETFRAME (bufp->frame_or_window, | 12456 | XSETFRAME (bufp->frame_or_window, |
| 12463 | ((mac_output *) GetWRefCon (window_ptr))->mFP); | 12457 | ((mac_output *) GetWRefCon (window_ptr))->mFP); |
| 12464 | count++; | 12458 | count++; |
| 12465 | bufp++; | ||
| 12466 | numchars--; | ||
| 12467 | } | 12459 | } |
| 12468 | break; | 12460 | break; |
| 12469 | 12461 | ||
| @@ -12603,8 +12595,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12603 | bufp->timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ | 12595 | bufp->timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ |
| 12604 | 12596 | ||
| 12605 | count++; | 12597 | count++; |
| 12606 | bufp++; | ||
| 12607 | numchars--; | ||
| 12608 | break; | 12598 | break; |
| 12609 | 12599 | ||
| 12610 | case kHighLevelEvent: | 12600 | case kHighLevelEvent: |
| @@ -12655,8 +12645,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12655 | #endif /* not TARGET_API_MAC_CARBON */ | 12645 | #endif /* not TARGET_API_MAC_CARBON */ |
| 12656 | 12646 | ||
| 12657 | count++; | 12647 | count++; |
| 12658 | bufp++; | ||
| 12659 | numchars--; | ||
| 12660 | } | 12648 | } |
| 12661 | 12649 | ||
| 12662 | default: | 12650 | default: |