From 655c01934043d9dc8c11457f3028f7b74cfd932c Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Wed, 25 Jan 2023 16:23:57 +0100 Subject: [PATCH] Win32: Prevent white window background during initialization --- src/win32_window.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index 676640bf..e83a0e70 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1122,11 +1122,6 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l break; } - case WM_ERASEBKGND: - { - return TRUE; - } - case WM_NCACTIVATE: case WM_NCPAINT: { @@ -1265,6 +1260,7 @@ static int createNativeWindow(_GLFWwindow* window, wc.lpfnWndProc = windowProc; wc.hInstance = _glfw.win32.instance; wc.hCursor = LoadCursorW(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); #if defined(_GLFW_WNDCLASSNAME) wc.lpszClassName = _GLFW_WNDCLASSNAME; #else