diff src/w32fns.c @ 102584:5cd33b0be96f

* w32term.h (WM_EMACS_PAINT): New message. * w32term.c (w32_read_socket): Use it instead of WM_PAINT. * w32fns.c (w32_wnd_proc): Change WM_PAINT to WM_EMACS_PAINT before passing to lisp thread. (Bug#950)
author Jason Rumney <jasonr@gnu.org>
date Sun, 15 Mar 2009 14:53:53 +0000
parents f978553ef98f
children ba9d933971ca
line wrap: on
line diff
--- a/src/w32fns.c	Sun Mar 15 14:52:19 2009 +0000
+++ b/src/w32fns.c	Sun Mar 15 14:53:53 2009 +0000
@@ -2841,7 +2841,12 @@
             EndPaint (hwnd, &paintStruct);
             leave_crit ();
 
-            my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
+	    /* Change the message type to prevent Windows from
+	       combining WM_PAINT messages in the Lisp thread's queue,
+	       since Windows assumes that each message queue is
+	       dedicated to one frame and does not bother checking
+	       that hwnd matches before combining them.  */
+            my_post_msg (&wmsg, hwnd, WM_EMACS_PAINT, wParam, lParam);
 
             return 0;
           }