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

From: Gerd Möllmann <[email-masked]>
Date: Sat, 22 Mar 2025 18:43:58 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Aaron Jensen <[email-masked]>
>> Date: Sat, 22 Mar 2025 09:47:47 -0700
>> Cc: [email-masked], [email-masked], [email-masked]
>> 
>> On Sat, Mar 22, 2025 at 9:41 AM, Eli Zaretskii <[email-masked]> wrote:
>> 
>>  From: Aaron Jensen <[email-masked]> 
>>  Date: Sat, 22 Mar 2025 09:17:08 -0700 
>>  Cc: [email-masked], [email-masked], [email-masked]
>> 
>>  In my config, I definitely see matrix comparisons when hidden buffers are updated. It's
>>  row_equal_p and update_text_area that are called in rapid succession even when the shell
>>  buffer is not visible. I tried disabling both my tab bar and my header line (I don't use a mode line)
>>  and I still saw it updating. 
>> 
>>  Here's an example log output, this repeats as quickly as yes emits "y" 
>> 
>>  dispnew.c:4775 
>>  dispnew.c:1295 
>>  dispnew.c:1295 
>>  dispnew.c:1295 
>>  dispnew.c:1295 
>>  dispnew.c:1295 
>>  dispnew.c:1295 
>>  dispnew.c:1295 
>>  dispnew.c:4775
>> 
>>  Is the mode_line_p flag of the glyph row set when these comparisons are made?
>> 
>> I see this:
>> 
>> update_text_area updated_row->mode_line_p: 0
>> update_text_area updated_row->mode_line_p: 1
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> row_equal_p a->mode_line_p: 0 b->mode_line_p: 0
>> … Many more of these in each iteration …
>> 
>> So it's set in one update_text_area, but not another.
>
> I'm afraid you will need to come up with a reproduction recipe for
> this, so that we could investigate what causes this.  Maybe it's a bug
> or maybe I'm missing something.

If it's something in Aaron's config, maybe he could bisect this. I'd
also look for something doing things to mode-line-format first, maybe.
But I also have no real idea what that is.