Subject: Re: bug#74876: 31.0.50; Force fringe refresh / force-window-update not affecting fringes

From: Eli Zaretskii <[email-masked]>
Date: Wed, 01 Jan 2025 21:39:50 +0200

> From: Michal Nazarewicz <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 01 Jan 2025 20:02:45 +0100
> 
> On Wed, Jan 01 2025, Eli Zaretskii wrote:
> >> From: Michal Nazarewicz <[email-masked]>
> >> Cc: [email-masked]
> >> Date: Wed, 01 Jan 2025 19:14:40 +0100
> >> 
> >> On Tue, Dec 17 2024, Eli Zaretskii wrote:
> >> > You have: declare this feature impossible to implement in a reasonable
> >> > way, given the restrictions of the current display engine design and
> >> > implementation.
> >> >
> >> > At the very least, I hope you will document this for the users, so
> >> > they are not surprised.
> >> 
> >> pulse.el forces 10 refreshes every 30 ms.  If that’s acceptable for
> >> package which is part of Emacs, a single refresh when people switch
> >> windows is good enough for a third-party package.
> >
> > pulse.el typically refreshes only a small portion of a window, and
> > therefore redisplay will only redraw that portion.  So this doesn't
> > normally lead to flickering (unless you pulse a large portion of the
> > window).
> 
> pulse.el changes face which forces refresh just as I described in this
> thread.  If you’re saying Emacs is smart enough to notice that only
> small portion of the window needs refreshing

It is.

> this should also be true in my case where only fringes need
> refreshing.

I was talking about your suggestion to redraw the entire frame.  That
will definitely cause flickering.  The way we avoid redrawing the
portions of the window which didn't change only work on the text area,
not on the fringes and other window/frame decorations.

It is, of course, possible to redesign how fringes are redrawn so that
we won't need to redraw the entire frame, but this exactly the
redesign I was saying would be needed to avoid the flicker.  IOW, with
the existing code you either have the partial redrawing of the
fringes, or you can force the entire frame be redrawn and get
flickering.