# HG changeset patch # User Jason Rumney # Date 1237128833 0 # Node ID 5cd33b0be96f355a7dc4f7868cd464ed4a9910dd # Parent 26be3f6dad7b3c9d96af745ff8fe6eb77529d53a * 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) diff -r 26be3f6dad7b -r 5cd33b0be96f src/ChangeLog --- a/src/ChangeLog Sun Mar 15 14:52:19 2009 +0000 +++ b/src/ChangeLog Sun Mar 15 14:53:53 2009 +0000 @@ -1,3 +1,10 @@ +2009-03-15 Jason Rumney + + * 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 * nsterm.m (ns_shutdown_properly, -terminate): Remove global state diff -r 26be3f6dad7b -r 5cd33b0be96f src/w32fns.c --- 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; } diff -r 26be3f6dad7b -r 5cd33b0be96f src/w32term.c --- a/src/w32term.c Sun Mar 15 14:52:19 2009 +0000 +++ b/src/w32term.c Sun Mar 15 14:53:53 2009 +0000 @@ -4105,7 +4105,7 @@ switch (msg.msg.message) { - case WM_PAINT: + case WM_EMACS_PAINT: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) diff -r 26be3f6dad7b -r 5cd33b0be96f src/w32term.h --- a/src/w32term.h Sun Mar 15 14:52:19 2009 +0000 +++ b/src/w32term.h Sun Mar 15 14:53:53 2009 +0000 @@ -609,7 +609,8 @@ #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)