From 355654487e5ce7601f4aaba9e076daa983f3c22d Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 29 Dec 2023 23:12:10 +0100 Subject: [PATCH] Fix #116618: Win32 Use Null for Background Window Brush Using a non-null background brush does remove an initial white flash while the program is loading and before we start painting. But this results in some extra and unnecessary redraws. Default WM_ERASEBKGND behaviour is to do nothing if this is brush is null, so if non-null we get erased and must redraw. Suppressing WM_ERASEBKGND will not give us that initial paint, so no benefit in keeping the brush added in #115968. Pull Request: https://projects.blender.org/blender/blender/pulls/116642 --- intern/ghost/intern/GHOST_SystemWin32.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc index 90ec4577370..a38e25719a7 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cc +++ b/intern/ghost/intern/GHOST_SystemWin32.cc @@ -603,7 +603,7 @@ GHOST_TSuccess GHOST_SystemWin32::init() #ifdef INW32_COMPISITING (HBRUSH)CreateSolidBrush #endif - (HBRUSH) GetStockObject(DKGRAY_BRUSH); + (0x00000000); wc.lpszMenuName = 0; wc.lpszClassName = L"GHOST_WindowClass";