GNU bug report logs - #64846
Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows

Previous Next

Package: emacs;

Reported by: Yanchi Tóth <yanchi.toth <at> gmail.com>

Date: Tue, 25 Jul 2023 10:21:01 UTC

Severity: normal

Full log


Message #26 received at 64846 <at> debbugs.gnu.org (full text, mbox):

From: Yanchi Tóth <yanchi.toth <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 64846 <at> debbugs.gnu.org
Subject: Re: bug#64846: Emacs 29 RC on Windows: White background color flashes
 on startup,
 before background color from config takes effect on Windows
Date: Thu, 27 Jul 2023 12:25:44 +0200
[Message part 1 (text/plain, inline)]
Po,

> what happens if you place:
>
>  (setq w32-disable-double-buffering t)
>
> in your early-init.el?

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?

On Wed, Jul 26, 2023 at 2:35 PM Po Lu <luangruo <at> yahoo.com> wrote:

> Eli Zaretskii <eliz <at> gnu.org> 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?
>
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.