summaryrefslogtreecommitdiff
path: root/src/macterm.c
diff options
context:
space:
mode:
authorAndrew Choi <akochoi@shaw.ca>2002-05-04 13:31:56 +0000
committerAndrew Choi <akochoi@shaw.ca>2002-05-04 13:31:56 +0000
commitc7764932ff619396f10ba8febd414fc8a627f9df (patch)
tree659658638a53e4c71b7114b6dfe7dbea31c30ddf /src/macterm.c
parent9a9c123f837fa44d580396c54fe69c9fc4e3e7f1 (diff)
downloademacs-c7764932ff619396f10ba8febd414fc8a627f9df.tar.gz
emacs-c7764932ff619396f10ba8febd414fc8a627f9df.tar.bz2
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.c14
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)
if (NILP (Fboundp (Qmac_ready_for_drag_n_drop)))
event_mask -= highLevelEventMask;
- while (WaitNextEvent (event_mask, &er, 0L, NULL) && numchars > 0)
+ if (WaitNextEvent (event_mask, &er, (expected ? app_sleep_time : 0L), NULL))
switch (er.what)
{
case mouseDown:
@@ -12339,8 +12339,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
mouse_tracking_in_progress = mouse_tracking_none;
tracked_scroll_bar = NULL;
count++;
- bufp++;
- numchars--;
break;
}
@@ -12356,8 +12354,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
bufp->kind = menu_bar_activate_event;
XSETFRAME (bufp->frame_or_window, f);
count++;
- bufp++;
- numchars--;
}
break;
@@ -12437,8 +12433,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
}
count++;
- bufp++;
- numchars--;
}
break;
@@ -12462,8 +12456,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
XSETFRAME (bufp->frame_or_window,
((mac_output *) GetWRefCon (window_ptr))->mFP);
count++;
- bufp++;
- numchars--;
}
break;
@@ -12603,8 +12595,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
bufp->timestamp = er.when * (1000 / 60); /* ticks to milliseconds */
count++;
- bufp++;
- numchars--;
break;
case kHighLevelEvent:
@@ -12655,8 +12645,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
#endif /* not TARGET_API_MAC_CARBON */
count++;
- bufp++;
- numchars--;
}
default: