From d00e96dfb2d68292b9723f62e213a5b03e66d6dc Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 9 Nov 2018 10:35:33 +0100 Subject: [PATCH] win32: force the window redraw when changing palette Fixes the "window stay red" after flashing bug. --- src/win32screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win32screen.c b/src/win32screen.c index 1c68e9f9..5c47a1b9 100644 --- a/src/win32screen.c +++ b/src/win32screen.c @@ -425,7 +425,7 @@ void Update_rect(short x, short y, unsigned short width, unsigned short height) rect.top = y * Pixel_height; rect.right = (x + width) * Pixel_width; rect.bottom = (y + height) * Pixel_height; - InvalidateRect(Win32_hwnd, &rect, TRUE); + InvalidateRect(Win32_hwnd, &rect, FALSE/*TRUE*/); } void Flush_update(void) @@ -459,6 +459,7 @@ int SetPalette(const T_Components * colors, int firstcolor, int ncolors) SelectObject(dc2, old_bmp); DeleteDC(dc2); ReleaseDC(Win32_hwnd, dc); + InvalidateRect(Win32_hwnd, NULL, FALSE); // Refresh the whole window return 1; }