From: Eli Zaretskii <eliz@gnu.org>
To: luangruo@yahoo.com
Cc: emacs-devel@gnu.org
Subject: Re: Flicker on MS Windows
Date: Mon, 07 Mar 2022 19:35:27 +0200 [thread overview]
Message-ID: <83lexlfyxs.fsf@gnu.org> (raw)
In-Reply-To: <83pmmxg7w8.fsf@gnu.org> (message from Eli Zaretskii on Mon, 07 Mar 2022 16:21:59 +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).
next prev parent reply other threads:[~2022-03-07 17:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87o82jpeee.fsf.ref@yahoo.com>
2022-03-06 10:24 ` Flicker on MS Windows Po Lu
2022-03-06 11:13 ` Eli Zaretskii
2022-03-06 11:27 ` Po Lu
2022-03-06 17:46 ` Eli Zaretskii
2022-03-07 0:40 ` Po Lu
2022-03-07 12:47 ` Eli Zaretskii
2022-03-07 14:04 ` Po Lu
2022-03-07 14:21 ` Eli Zaretskii
2022-03-07 14:28 ` Eli Zaretskii
2022-03-08 0:25 ` Po Lu
2022-03-07 17:35 ` Eli Zaretskii [this message]
2022-03-08 0:26 ` Po Lu
2022-03-08 3:28 ` Eli Zaretskii
2022-03-06 16:59 ` Óscar Fuentes
2022-03-06 17:05 ` Eli Zaretskii
2022-03-06 17:10 ` Óscar Fuentes
2022-03-06 17:19 ` Eli Zaretskii
2022-03-06 18:09 ` Óscar Fuentes
2022-03-07 0:38 ` Po Lu
2022-03-07 0:37 ` Po Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83lexlfyxs.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).