Subject: Re: bug#77039: 31.0.50; Flickering on macOS

From: Eli Zaretskii <[email-masked]>
Date: Mon, 17 Mar 2025 14:39:05 +0200

> Cc: Alan Third <[email-masked]>, [email-masked]
> From: Gerd Möllmann <[email-masked]>
> Date: Mon, 17 Mar 2025 05:20:11 +0100
> 
> Aaron Jensen <[email-masked]> writes:
> 
> >  Does that also happen when you use something else than vterm, say M-x shell or M-x eshell?
> >
> > Yes, it happens with shell and term as well
> 
> To me that looks as if this shouldn't happen. At least judging from what
> I remember from the times of Emacs 21.
> 
> Maybe Eli has an idea what could cause this. It might be worth submitting
> another bug for this.

If you are talking about comparing glyph matrices of windows/frames
that are not shown, that shouldn't happen.  If it seems to happen, I'd
need a clear recipe where it does, which I could run on GNU/Linux or
MS-Windows, to debug this.  Windows that are not displayed don't even
have desired matrices to compare, so I don't think I understand how
this could be possible.

> > Is it clear to you why the glyph comparison failing would lead to
> > flickering, even with double buffering enabled?
> 
> Heard about the double-buffering feature the first time yesterday, I
> think. I had it in a branch in Emacs 21, but I guess it's not that one
> :-). Or IOW, no idea. It might depend on how that's implemented.

If glyph comparison fails, Emacs will redraw the screen.  Whether it
should be visible with double-buffering depends on how that was
implemented on macOS, and what exactly "flickers" as part of
"flickering".