From 9ac9d7b85a224bb932f4a74912ddf5625a4eb110 Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Sun, 18 Nov 2018 23:32:11 -0500 Subject: [PATCH] Win32: Disable non-client painting if undecorated Fixes an issue where a small title bar and window caption buttons were being painted after restoring a minimized undecorated window. Closes #1383. --- src/win32_window.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/win32_window.c b/src/win32_window.c index 796ae150..daef1536 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1161,6 +1161,19 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, DragFinish(drop); return 0; } + + case WM_NCACTIVATE: + case WM_NCPAINT: + { + // HACK: Prevent title bar artifacts from appearing after restoring + // a minimized borderless window + if (!window->decorated) + { + return TRUE; + } + + break; + } } return DefWindowProcW(hWnd, uMsg, wParam, lParam);