Subject: bug#71763: [PATCH] Inconsistency in bitmap overlay drawing for macOS

From: Gerd Möllmann <[email-masked]>
Date: Sun, 27 Oct 2024 14:23:49 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Daniel Pettersson <[email-masked]>
>> Cc: [email-masked]
>> Date: Sun, 27 Oct 2024 11:26:50 +0100
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > Can some macOS expert please review the proposed patch?
>> Seems like they are hard to come by.
>> 
>> I have been using this patch since I reported the bug, how can I help
>> move this along?
>
> Thanks, but maybe Gerd (CCed) will agree to look at this?

The struct draw_fringe_bitmap_params is not documented very well, so
I've looked at fringe.c for what its overlay_p member means. I landed in
draw_fringe_bitmap_1, where draw_fringe_bitmap_params::overlay_p is set
if that function is called with an overlay parameter that fits some
criterion, which one can try to figure out in its caller
draw_fringe_bitmap. It apparently has something to do with drawing a
cursor in a fringe, and then also drawing an overlay arrow.

Didn't even know until a few minutes ago that the cursor can land in
the fringe. And I'm wondering if that ever happens in the left fringe,
and/or if the overlay arrow appears only on the left. Questions upon
questions, as usual.

Anyway. Assuming that I read the code correctly, that we are drawing a
cursor and overlay arrow on top of each other, then I think Daniel's
patch makes sense, because drawing the overlay arrow should not clear
under it and erase what was drawn for the cursor before.

That's about what I could find out. NS should do something different if
overlay_p is set or not, I think that's for sure. And if Daniel says it
works, that's goog enough for me I guess.