comparison src/event-msw.c @ 327:03446687b7cc r21-0-61

Import from CVS: tag r21-0-61
author cvs
date Mon, 13 Aug 2007 10:48:16 +0200
parents 341dac730539
children 182f72e8cd0d
comparison
equal deleted inserted replaced
326:e2671bc7f66a 327:03446687b7cc
26 /* Authorship: 26 /* Authorship:
27 27
28 Ultimately based on FSF. 28 Ultimately based on FSF.
29 Rewritten by Ben Wing. 29 Rewritten by Ben Wing.
30 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0. 30 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
31 Subprocess and modal loop support by Kirill M. Katsnelson.
31 */ 32 */
32 33
33 #include <config.h> 34 #include <config.h>
34 #include "lisp.h" 35 #include "lisp.h"
35 36
2577 } 2578 }
2578 2579
2579 static void 2580 static void
2580 emacs_mswindows_quit_p (void) 2581 emacs_mswindows_quit_p (void)
2581 { 2582 {
2583 MSG msg;
2584
2582 /* Quit cannot happen in modal loop: all program 2585 /* Quit cannot happen in modal loop: all program
2583 input is dedicated to Windows. */ 2586 input is dedicated to Windows. */
2584 if (mswindows_in_modal_loop) 2587 if (mswindows_in_modal_loop)
2585 return; 2588 return;
2586 2589
2587 /* Drain windows queue. This sets up number of quit 2590 /* Drain windows queue. This sets up number of quit characters in the queue
2588 characters in in the queue */ 2591 * (and also processes wm focus change, move, resize, etc messages).
2589 mswindows_drain_windows_queue (); 2592 * We don't want to process WM_PAINT messages because this function can be
2593 * called from almost anywhere and the windows' states may be changing. */
2594 while (PeekMessage (&msg, NULL, 0, WM_PAINT-1, PM_REMOVE) ||
2595 PeekMessage (&msg, NULL, WM_PAINT+1, WM_USER-1, PM_REMOVE))
2596 DispatchMessage (&msg);
2590 2597
2591 if (mswindows_quit_chars_count > 0) 2598 if (mswindows_quit_chars_count > 0)
2592 { 2599 {
2593 /* Yes there's a hidden one... Throw it away */ 2600 /* Yes there's a hidden one... Throw it away */
2594 struct Lisp_Event match_against; 2601 struct Lisp_Event match_against;