aboutsummaryrefslogtreecommitdiffstats
path: root/mac/src
diff options
context:
space:
mode:
authorAndrew Choi2001-09-04 05:45:39 +0000
committerAndrew Choi2001-09-04 05:45:39 +0000
commit1305f1a7f48d3b3a0234bf4cdd0e24caa888d7d4 (patch)
treea0a1136745eb18574eedfbf92883caf3193bf9c6 /mac/src
parent9f1821c7df1c7fae53a6cf24525b4b370265d801 (diff)
downloademacs-1305f1a7f48d3b3a0234bf4cdd0e24caa888d7d4.tar.gz
emacs-1305f1a7f48d3b3a0234bf4cdd0e24caa888d7d4.zip
2001-09-04 Andrew Choi <akochoi@cse.cuhk.edu.hk>
* src/macterm.c (XTread_socket): Read all pending events in the event queue instead of one.
Diffstat (limited to 'mac/src')
-rw-r--r--mac/src/macterm.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/mac/src/macterm.c b/mac/src/macterm.c
index 1a0544920ac..db7b50884bb 100644
--- a/mac/src/macterm.c
+++ b/mac/src/macterm.c
@@ -11356,7 +11356,7 @@ do_os_event (EventRecord *erp)
11356 do_app_suspend (); 11356 do_app_suspend ();
11357 break; 11357 break;
11358 11358
11359 case mouseMovedMessage: 11359 case mouseMovedMessage: /* never reached */
11360 do_mouse_moved (erp->where); 11360 do_mouse_moved (erp->where);
11361 break; 11361 break;
11362 } 11362 }
@@ -11826,7 +11826,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11826 if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) 11826 if (NILP (Fboundp (Qmac_ready_for_drag_n_drop)))
11827 event_mask -= highLevelEventMask; 11827 event_mask -= highLevelEventMask;
11828 11828
11829 if (WaitNextEvent (event_mask, &er, (expected ? app_sleep_time : 0L), NULL)) 11829 while (WaitNextEvent (event_mask, &er, 0L, NULL) && numchars > 0)
11830 switch (er.what) 11830 switch (er.what)
11831 { 11831 {
11832 case mouseDown: 11832 case mouseDown:
@@ -11859,6 +11859,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11859 mouse_tracking_in_progress = mouse_tracking_none; 11859 mouse_tracking_in_progress = mouse_tracking_none;
11860 tracked_scroll_bar = NULL; 11860 tracked_scroll_bar = NULL;
11861 count++; 11861 count++;
11862 bufp++;
11863 numchars--;
11862 break; 11864 break;
11863 } 11865 }
11864 11866
@@ -11874,6 +11876,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11874 bufp->kind = menu_bar_activate_event; 11876 bufp->kind = menu_bar_activate_event;
11875 XSETFRAME (bufp->frame_or_window, f); 11877 XSETFRAME (bufp->frame_or_window, f);
11876 count++; 11878 count++;
11879 bufp++;
11880 numchars--;
11877 } 11881 }
11878 break; 11882 break;
11879 11883
@@ -11938,6 +11942,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11938 } 11942 }
11939 11943
11940 count++; 11944 count++;
11945 bufp++;
11946 numchars--;
11941 } 11947 }
11942 break; 11948 break;
11943 11949
@@ -11952,6 +11958,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
11952 XSETFRAME (bufp->frame_or_window, 11958 XSETFRAME (bufp->frame_or_window,
11953 ((mac_output *) GetWRefCon (window_ptr))->mFP); 11959 ((mac_output *) GetWRefCon (window_ptr))->mFP);
11954 count++; 11960 count++;
11961 bufp++;
11962 numchars--;
11955 } 11963 }
11956 break; 11964 break;
11957 11965
@@ -12088,6 +12096,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12088 bufp->timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ 12096 bufp->timestamp = er.when * (1000 / 60); /* ticks to milliseconds */
12089 12097
12090 count++; 12098 count++;
12099 bufp++;
12100 numchars--;
12091 break; 12101 break;
12092 12102
12093 case kHighLevelEvent: 12103 case kHighLevelEvent:
@@ -12129,6 +12139,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12129 InvalRect (&(wp->portRect)); 12139 InvalRect (&(wp->portRect));
12130 12140
12131 count++; 12141 count++;
12142 bufp++;
12143 numchars--;
12132 } 12144 }
12133 12145
12134 default: 12146 default: