- /* Drain windows queue. This sets up number of quit characters in the queue
- * (and also processes wm focus change, move, resize, etc messages).
- * We don't want to process WM_PAINT messages because this function can be
- * called from almost anywhere and the windows' states may be changing. */
- while (PeekMessage (&msg, NULL, 0, WM_PAINT-1, PM_REMOVE) ||
- PeekMessage (&msg, NULL, WM_PAINT+1, WM_USER-1, PM_REMOVE))
- DispatchMessage (&msg);
+ /* Drain windows queue. This sets up number of quit characters in
+ the queue */
+ mswindows_drain_windows_queue (1);