changeset 39104:6addcec799eb

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.
author Andrew Choi <akochoi@shaw.ca>
date Tue, 04 Sep 2001 05:45:39 +0000
parents a53eba1d3542
children c56375806351
files mac/ChangeLog mac/src/macterm.c
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mac/ChangeLog	Tue Sep 04 05:23:58 2001 +0000
+++ b/mac/ChangeLog	Tue Sep 04 05:45:39 2001 +0000
@@ -1,5 +1,8 @@
 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.
+
 	* makefile.MPW: Generate etc/DOC file from .elc files instead of
 	.el files.
 
--- a/mac/src/macterm.c	Tue Sep 04 05:23:58 2001 +0000
+++ b/mac/src/macterm.c	Tue Sep 04 05:45:39 2001 +0000
@@ -11356,7 +11356,7 @@
 	do_app_suspend ();
       break;
 				
-    case mouseMovedMessage:
+    case mouseMovedMessage:	/* never reached */
       do_mouse_moved (erp->where);
       break;
     }
@@ -11826,7 +11826,7 @@
   if (NILP (Fboundp (Qmac_ready_for_drag_n_drop)))
     event_mask -= highLevelEventMask;
 
-  if (WaitNextEvent (event_mask, &er, (expected ? app_sleep_time : 0L), NULL))
+  while (WaitNextEvent (event_mask, &er, 0L, NULL) && numchars > 0)
     switch (er.what)
       {
       case mouseDown:
@@ -11859,6 +11859,8 @@
               mouse_tracking_in_progress = mouse_tracking_none;
               tracked_scroll_bar = NULL;
               count++;
+	      bufp++;
+	      numchars--;
               break;
             }
 
@@ -11874,6 +11876,8 @@
                 bufp->kind = menu_bar_activate_event;
                 XSETFRAME (bufp->frame_or_window, f);
                 count++;
+		bufp++;
+		numchars--;
               }
 	      break;
 
@@ -11938,6 +11942,8 @@
 		    }
 								
 	          count++;
+		  bufp++;
+		  numchars--;
 	        }
 	      break;
 
@@ -11952,6 +11958,8 @@
 	          XSETFRAME (bufp->frame_or_window,
 			     ((mac_output *) GetWRefCon (window_ptr))->mFP);
  	          count++;
+		  bufp++;
+		  numchars--;
 	        }
 	      break;
 
@@ -12088,6 +12096,8 @@
 	bufp->timestamp = er.when * (1000 / 60);  /* ticks to milliseconds */
 
 	count++;
+	bufp++;
+	numchars--;
 	break;
 
       case kHighLevelEvent:
@@ -12129,6 +12139,8 @@
               InvalRect (&(wp->portRect));
             
             count++;
+	    bufp++;
+	    numchars--;
           }
         
       default: