* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
@ 2023-07-25 8:56 Yanchi Tóth
2023-07-25 12:44 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Yanchi Tóth @ 2023-07-25 8:56 UTC (permalink / raw)
To: 64846
[-- Attachment #1.1: Type: text/plain, Size: 6024 bytes --]
White background color flashes on startup, before background color from
config takes effect in parts of the rectangle occupied by Emacs. Didn't
happen on 28.2, but does happen on both this RC, and the other 29
pretests. See video attachment, and please let me know if I can be of any
help.
In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-07-23 built on
AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.19045
System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.3208)
Configured using:
'configure --with-modules --without-dbus --with-native-compilation=aot
--without-compress-install --with-tree-sitter CFLAGS=-O2'
Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB
Important settings:
value of $LANG: ENU
locale-coding-system: cp1252
Major mode: Fundamental
Minor modes in effect:
ivy-mode: t
override-global-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
straight-symlink-emulation-mode: t
straight-live-modifications-mode: t
global-subword-mode: t
subword-mode: t
global-auto-revert-mode: t
delete-selection-mode: t
electric-pair-mode: t
global-so-long-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
c:/Users/yanchith/.emacs.d/straight/build/transient/transient hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/transient
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package-lint
hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package-lint
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package-jump
hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package-jump
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package-ensure
hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package-ensure
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package-diminish
hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package-diminish
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package-delight
hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package-delight
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package-core
hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package-core
c:/Users/yanchith/.emacs.d/straight/build/use-package/use-package-bind-key
hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/use-package-bind-key
c:/Users/yanchith/.emacs.d/straight/build/bind-key/bind-key hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/use-package/bind-key
c:/Users/yanchith/.emacs.d/straight/build/csharp-mode/csharp-mode hides
c:/Users/yanchith/emacs-29.1-rc1/share/emacs/29.1/lisp/progmodes/csharp-mode
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822
mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils thingatpt counsel xdg xref project byte-opt dired
dired-loaddefs compile text-property-search comint ansi-osc ansi-color
swiper pcase abu-theme wgsl-mode-autoloads glsl-mode-autoloads
csharp-mode-autoloads typescript-mode-autoloads rust-mode-autoloads
counsel-autoloads swiper-autoloads ivy ring ivy-faces ivy-overlay colir
color ivy-autoloads magit-autoloads magit-section-autoloads
git-commit-autoloads with-editor-autoloads transient-autoloads
compat-autoloads expand-region-autoloads multiple-cursors-autoloads
finder-inf edmacro kmacro move-text-autoloads whitespace f-autoloads
dash-autoloads s-autoloads use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
use-package-core use-package-autoloads bind-key-autoloads
straight-autoloads straight cap-words superword subword autorevert
filenotify easy-mmode delsel comp comp-cstr warnings icons subr-x rx
cl-seq cl-macs gv cl-extra help-mode bytecomp byte-compile elec-pair
hl-line so-long cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads w32notify w32 lcms2 multi-tty make-network-process
native-compile emacs)
Memory information:
((conses 16 149365 11248)
(symbols 48 12552 0)
(strings 32 39098 2504)
(string-bytes 1 1467890)
(vectors 16 25019)
(vector-slots 8 482359 16812)
(floats 8 124 237)
(intervals 56 263 0)
(buffers 984 11))
[-- Attachment #1.2: Type: text/html, Size: 6452 bytes --]
[-- Attachment #2: emacs-flash-of-white.webm --]
[-- Type: video/webm, Size: 27497 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-25 8:56 bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows Yanchi Tóth
@ 2023-07-25 12:44 ` Eli Zaretskii
2023-07-25 13:32 ` Yanchi Tóth
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-07-25 12:44 UTC (permalink / raw)
To: Yanchi Tóth; +Cc: 64846
> From: Yanchi Tóth <yanchi.toth@gmail.com>
> Date: Tue, 25 Jul 2023 10:56:31 +0200
>
> White background color flashes on startup, before background color from
> config takes effect in parts of the rectangle occupied by Emacs. Didn't
> happen on 28.2, but does happen on both this RC, and the other 29
> pretests. See video attachment, and please let me know if I can be of any help.
Please show a minimal init file that can be used to reproduce this
behavior.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-25 12:44 ` Eli Zaretskii
@ 2023-07-25 13:32 ` Yanchi Tóth
2023-07-25 14:33 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Yanchi Tóth @ 2023-07-25 13:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 64846
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
Hi!
I managed to reproduce with this fairly minimal configuration:
(set-background-color "#191919")
(set-foreground-color "burlywood")
Because the config is much smaller, the flash of white is much shorter, but
still noticeable.
On Tue, Jul 25, 2023 at 2:43 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Yanchi Tóth <yanchi.toth@gmail.com>
> > Date: Tue, 25 Jul 2023 10:56:31 +0200
> >
> > White background color flashes on startup, before background color from
> > config takes effect in parts of the rectangle occupied by Emacs. Didn't
> > happen on 28.2, but does happen on both this RC, and the other 29
> > pretests. See video attachment, and please let me know if I can be of
> any help.
>
> Please show a minimal init file that can be used to reproduce this
> behavior.
>
> Thanks.
>
[-- Attachment #2: Type: text/html, Size: 1288 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-25 13:32 ` Yanchi Tóth
@ 2023-07-25 14:33 ` Eli Zaretskii
2023-07-26 8:32 ` Yanchi Tóth
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-07-25 14:33 UTC (permalink / raw)
To: Yanchi Tóth; +Cc: 64846
> From: Yanchi Tóth <yanchi.toth@gmail.com>
> Date: Tue, 25 Jul 2023 15:32:33 +0200
> Cc: 64846@debbugs.gnu.org
>
> I managed to reproduce with this fairly minimal configuration:
>
> (set-background-color "#191919")
> (set-foreground-color "burlywood")
>
> Because the config is much smaller, the flash of white is much shorter, but still noticeable.
Instead of the above, try adding to your early-init file the
following:
(add-to-list 'default-frame-alist
'(background-color . "#191919")
'(foreground-color . "burlywood"))
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-25 14:33 ` Eli Zaretskii
@ 2023-07-26 8:32 ` Yanchi Tóth
2023-07-26 11:20 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Yanchi Tóth @ 2023-07-26 8:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 64846
[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]
Hmmm. I tried adding the early init file with what you suggest, but the
situation stays the same
Note that if I make the frame larger at startup, the bright rectangle stays
pretty much the same size,
which hints at this being related to repainting dirty areas? Maybe when
Windows sends the first WM_ERASEBKGND,
the frame background color is not set yet, so Emacs repaints with white?
I don't think this is a release blocker, and I could investigate this later
myself, if it would help.
On Tue, Jul 25, 2023 at 4:32 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Yanchi Tóth <yanchi.toth@gmail.com>
> > Date: Tue, 25 Jul 2023 15:32:33 +0200
> > Cc: 64846@debbugs.gnu.org
> >
> > I managed to reproduce with this fairly minimal configuration:
> >
> > (set-background-color "#191919")
> > (set-foreground-color "burlywood")
> >
> > Because the config is much smaller, the flash of white is much shorter,
> but still noticeable.
>
> Instead of the above, try adding to your early-init file the
> following:
>
> (add-to-list 'default-frame-alist
> '(background-color . "#191919")
> '(foreground-color . "burlywood"))
>
[-- Attachment #2: Type: text/html, Size: 1793 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-26 8:32 ` Yanchi Tóth
@ 2023-07-26 11:20 ` Eli Zaretskii
2023-07-26 12:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-07-26 11:20 UTC (permalink / raw)
To: Yanchi Tóth; +Cc: 64846
> From: Yanchi Tóth <yanchi.toth@gmail.com>
> Date: Wed, 26 Jul 2023 10:32:54 +0200
> Cc: 64846@debbugs.gnu.org
>
> Hmmm. I tried adding the early init file with what you suggest, but the situation stays the same
The other possibility is to set the background and foreground colors
in the X resources. On Windows, you can put these "X resources" in
the Registry, and Emacs will follow them. See the node "X Resources"
in the Emacs user manual for the details.
> Note that if I make the frame larger at startup, the bright rectangle stays pretty much the same size,
> which hints at this being related to repainting dirty areas? Maybe when Windows sends the first
> WM_ERASEBKGND,
> the frame background color is not set yet, so Emacs repaints with white?
Maybe. I don't know enough about the low-level details of the Emacs
display on Windows to tell.
> I don't think this is a release blocker, and I could investigate this later myself, if it would help.
It definitely won't block the release of Emacs 29.1.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-26 11:20 ` Eli Zaretskii
@ 2023-07-26 12:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-27 10:25 ` Yanchi Tóth
0 siblings, 1 reply; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-07-26 12:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Yanchi Tóth, 64846
Eli Zaretskii <eliz@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?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-26 12:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-07-27 10:25 ` Yanchi Tóth
2023-07-27 12:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 9+ messages in thread
From: Yanchi Tóth @ 2023-07-27 10:25 UTC (permalink / raw)
To: Po Lu; +Cc: Eli Zaretskii, 64846
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
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@yahoo.com> wrote:
> Eli Zaretskii <eliz@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?
>
[-- Attachment #2: Type: text/html, Size: 1962 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows
2023-07-27 10:25 ` Yanchi Tóth
@ 2023-07-27 12:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-07-27 12:45 UTC (permalink / raw)
To: Yanchi Tóth; +Cc: Eli Zaretskii, 64846
Yanchi Tóth <yanchi.toth@gmail.com> 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.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-07-27 12:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 8:56 bug#64846: Emacs 29 RC on Windows: White background color flashes on startup, before background color from config takes effect on Windows Yanchi Tóth
2023-07-25 12:44 ` Eli Zaretskii
2023-07-25 13:32 ` Yanchi Tóth
2023-07-25 14:33 ` Eli Zaretskii
2023-07-26 8:32 ` Yanchi Tóth
2023-07-26 11:20 ` Eli Zaretskii
2023-07-26 12:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-27 10:25 ` Yanchi Tóth
2023-07-27 12:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.