]> git.eshelyaron.com Git - emacs.git/commitdiff
* w32term.h (WM_EMACS_PAINT): New message.
authorJason Rumney <jasonr@gnu.org>
Sun, 15 Mar 2009 14:53:53 +0000 (14:53 +0000)
committerJason Rumney <jasonr@gnu.org>
Sun, 15 Mar 2009 14:53:53 +0000 (14:53 +0000)
* 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)

src/ChangeLog
src/w32fns.c
src/w32term.c
src/w32term.h

index d1ae1373793a5b6699e173495f26a10989d742cc..e222b8bb8ce4f591c7885cfcf22dc1915ca37e44 100644 (file)
@@ -1,3 +1,10 @@
+2009-03-15  Jason Rumney  <jasonr@gnu.org>
+
+       * 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)
+
 2009-03-14  David Reitter <david.reitter@gmail.com>
 
        * nsterm.m (ns_shutdown_properly, -terminate): Remove global state
index 97b9adea2ce1208071d47f4a410f7cdc06ad0abc..bf261a754de83bed6c2d45d34715270504c62a03 100644 (file)
@@ -2841,7 +2841,12 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
             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;
           }
index 34fc450217f76945499a705923c2741c885d83a5..e16f07f088cb1ae5207c877801519e5567c07967 100644 (file)
@@ -4105,7 +4105,7 @@ w32_read_socket (sd, expected, hold_quit)
 
       switch (msg.msg.message)
        {
-       case WM_PAINT:
+       case WM_EMACS_PAINT:
          f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
 
          if (f)
index a40cf460665e14ed1416b0c8fb733ebafdb1be08..8181d610cde4da5f5b69bdb34db59936e7bb653d 100644 (file)
@@ -609,7 +609,8 @@ do { \
 #define WM_EMACS_SHOW_CARET            (WM_EMACS_START + 17)
 #define WM_EMACS_HIDE_CARET            (WM_EMACS_START + 18)
 #define WM_EMACS_SETCURSOR             (WM_EMACS_START + 19)
-#define WM_EMACS_END                   (WM_EMACS_START + 20)
+#define WM_EMACS_PAINT                 (WM_EMACS_START + 20)
+#define WM_EMACS_END                   (WM_EMACS_START + 21)
 
 #define WND_FONTWIDTH_INDEX    (0)
 #define WND_LINEHEIGHT_INDEX   (4)