changeset 15034:fb947ec168a8

(defined_color): Map color to nearest in default palette. (win32_wnd_proc): Special handling for WM_CLOSE.
author Richard M. Stallman <rms@gnu.org>
date Tue, 16 Apr 1996 21:49:18 +0000
parents 9e174c2b4ba6
children a538ad05bce1
files src/w32fns.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Tue Apr 16 20:41:24 1996 +0000
+++ b/src/w32fns.c	Tue Apr 16 21:49:18 1996 +0000
@@ -1185,7 +1185,9 @@
 
   if (!NILP (tem)) 
     {
-      *color_def = XUINT (tem);
+      /* map color to nearest in (default) palette, to avoid
+	 dithering on limited color displays. */
+      *color_def = XUINT (tem) | 0x2000000;
       return 1;
     } 
   else 
@@ -2777,12 +2779,16 @@
     case WM_MOVE:
     case WM_SIZE:
     case WM_KILLFOCUS:
-    case WM_CLOSE:
     case WM_VSCROLL:
     case WM_SYSCOMMAND:
     case WM_COMMAND:
       my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
       goto dflt;
+
+    case WM_CLOSE:
+      my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
+      return 0;
+
     case WM_WINDOWPOSCHANGING:
       {
 	WINDOWPLACEMENT wp;