emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flicker on MS Windows


From: Eli Zaretskii
Subject: Re: Flicker on MS Windows
Date: Mon, 07 Mar 2022 19:35:27 +0200

> Date: Mon, 07 Mar 2022 16:21:59 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > BTW, here's another way to reproduce some severe flicker on MS Windows:
> > just type "M-: (run-hooks 'xref-after-jump-hook) RET", and the tool bar
> > buttons, cursor and text start to flicker severely.  The tool bar
> > buttons flicker in a peculiar way: the background is displayed, but the
> > image itself flickers with interleaved bands of black.
> 
> I don't see any flickering here, after the above.  The window
> recenters and I see a single line pulsed; that's all Moreover, Emacs
> consumes exactly zero CPU cycles after evaluating that expression.

If I increase pulse-iterations to 1000 (from the default of 10), then
in an unoptimized build I see a rare and barely-visible flickering of
the tool bar images, as if they are redrawn.

However, I cannot find where this redrawing comes from.  Both xdisp.c
and dispnew.c do their jobs correctly, and the tool bar is never
actually redrawn on these levels.  If I put a breakpoint where
dispnew.c actually writes to the glass using the terminal-specific
write_glyphs method, as part of the update_frame call, that breakpoint
never breaks in all those 1000 iterations, not once.  Which means that
we correctly decide that the tool bar didn't change and does not need
to be redrawn.

So it sounds like it's some very low-level Windows-specific code,
perhaps triggered by messages we send to the GUI thread or something?
This is an area in Emacs about which I know very little.  Ideas
regarding what could cause this are welcome.

And again, it's barely perceptible here, even with this non-trivial
setup and a relatively slow Emacs.  I have no idea why it's so
prominent in your case (assuming it's the same issue that I see, which
is not certain, since what I see looks like redrawing of the images on
the tool-bar buttons).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]