Commit 8847d890 authored by Richard M. Stallman's avatar Richard M. Stallman

(defined_color): Map color to nearest in default palette.

(win32_wnd_proc): Special handling for WM_CLOSE.
parent 26367193
...@@ -1185,7 +1185,9 @@ defined_color (f, color, color_def, alloc) ...@@ -1185,7 +1185,9 @@ defined_color (f, color, color_def, alloc)
if (!NILP (tem)) 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; return 1;
} }
else else
...@@ -2777,12 +2779,16 @@ win32_wnd_proc (hwnd, msg, wParam, lParam) ...@@ -2777,12 +2779,16 @@ win32_wnd_proc (hwnd, msg, wParam, lParam)
case WM_MOVE: case WM_MOVE:
case WM_SIZE: case WM_SIZE:
case WM_KILLFOCUS: case WM_KILLFOCUS:
case WM_CLOSE:
case WM_VSCROLL: case WM_VSCROLL:
case WM_SYSCOMMAND: case WM_SYSCOMMAND:
case WM_COMMAND: case WM_COMMAND:
my_post_msg (&wmsg, hwnd, msg, wParam, lParam); my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
goto dflt; goto dflt;
case WM_CLOSE:
my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
return 0;
case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGING:
{ {
WINDOWPLACEMENT wp; WINDOWPLACEMENT wp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment