Subject: 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: Thu, 27 Jul 2023 20:45:08 +0800

Yanchi Tóth <[email-masked]> writes:

> It helps, but doesn't remove the bright flash altogether. Hard to
> tell, but I believe it shortens the time of the flash to just one
> frame.  For comparison: 28.2 doesn't have any perceptible bright
> flash.
>
> I will have some time over the weekend to look at the code, but I
> haven't seen the Emacs codebase yet, so I might be taking more than I
> can handle. Can you give me any pointers where to look?

See w32fns.c (specifically, `w32_wnd_proc', which responds to
WM_ERASEBKGND messages), `get_frame_dc' in w32xfns.c (which creates the
back buffer), and w32term.c, where you will find a large table of
function pointers that implement the interfaces redisplay uses to draw
glyphs on MS Windows under the name `w32_redisplay_interface'.

I'm hardly an expert in MS Windows graphics, BTW.  You likely know more
than I do.

Thanks.