Subject: Re: bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows

From: Po Lu <[email-masked]>
Date: Wed, 26 Jul 2023 20:35:05 +0800

Eli Zaretskii <[email-masked]> writes:

> Maybe.  I don't know enough about the low-level details of the Emacs
> display on Windows to tell.

Could this be related to the new MS-Windows double buffering code?

When WM_ERASEBKGND arrives and double buffering is enabled, Emacs simply
copies the back buffer contents to the front buffer HWND.  Perhaps this
bug is a result of the copy transpiring in between the creation of the
back buffer, and when redisplay first clears the frame with its
background color.  In that case, the solution is for the back buffer to
always be filled with the frame background color after every time it is
created, instead of whichever color CreateCompatibleBitmap opts to fill
it with by default.

Yachani, what happens if you place:

  (setq w32-disable-double-buffering t)

in your early-init.el?