]> git.eshelyaron.com Git - emacs.git/commitdiff
2001-09-04 Andrew Choi <akochoi@cse.cuhk.edu.hk>
authorAndrew Choi <akochoi@shaw.ca>
Tue, 4 Sep 2001 05:45:39 +0000 (05:45 +0000)
committerAndrew Choi <akochoi@shaw.ca>
Tue, 4 Sep 2001 05:45:39 +0000 (05:45 +0000)
* src/macterm.c (XTread_socket): Read all pending events in the
event queue instead of one.

mac/ChangeLog
mac/src/macterm.c

index 4b56537c0a9af9591764801c85714d5ab8a6e597..fd259a54609bad8c1c869305f79be4ca300beb4f 100644 (file)
@@ -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.
 
index 1a0544920ac8eec2f2a77d15359c36a6105d6ff5..db7b50884bbf1681bc35be3a7be3dbca077534ab 100644 (file)
@@ -11356,7 +11356,7 @@ do_os_event (EventRecord *erp)
        do_app_suspend ();
       break;
                                
-    case mouseMovedMessage:
+    case mouseMovedMessage:    /* never reached */
       do_mouse_moved (erp->where);
       break;
     }
@@ -11826,7 +11826,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;
 
-  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 @@ 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;
             }
 
@@ -11874,6 +11876,8 @@ 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;
 
@@ -11938,6 +11942,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
                    }
                                                                
                  count++;
+                 bufp++;
+                 numchars--;
                }
              break;
 
@@ -11952,6 +11958,8 @@ 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;
 
@@ -12088,6 +12096,8 @@ 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:
@@ -12129,6 +12139,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
               InvalRect (&(wp->portRect));
             
             count++;
+           bufp++;
+           numchars--;
           }
         
       default: