Subject: Re: bug#42406: Mouse-wheel scrolling can be flickering

From: Eli Zaretskii <[email-masked]>
Date: Thu, 17 Dec 2020 22:58:11 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 17 Dec 2020 15:35:27 -0500
> 
> So, now I'm wondering where is the code that causes the frame title to
> be (properly) refreshed in my tests!

I hope now you better understand why I dislike this kind of messing
with the likes of update_mode_lines and the rest.  We are flying
blind, so how can we hope to arrive at the destination safely and
quickly?

If we want to make any improvements in redisplay efficiency, we should
simply toss what we have and start anew, redefining each flag
accurately and adding more flags/values to augment the existing ones.
Globals like update_mode_lines should simply go away: how long does it
take to loop over all the frames/windows and set the corresponding
flag of each one of them (not that I see why we would even need to do
that for all the windows)?  And the window's update_mode_line flag
should not be used for deciding about all the -lines and frame-title,
we should instead have much more fine-grained flags that would allow
us to make separate decisions regarding each one of them; for example,
when only the column number changes, the flags should tell us that the
mode line might need update, but the frame title definitely doesn't.