Subject: Re: bug#77429: 31.0.50; Image map and display slice on mode/header/tab line

From: Eli Zaretskii <[email-masked]>
Date: Wed, 02 Apr 2025 16:13:43 +0300

> Date: Tue, 1 Apr 2025 21:31:39 +0200
> Cc: [email-masked]
> From: David Ponce <[email-masked]>
> 
> On 2025-04-01 20:53, Eli Zaretskii wrote:
> >> Date: Tue, 1 Apr 2025 19:57:14 +0200
> >> Cc: [email-masked]
> >> From: David Ponce <[email-masked]>
> >>
> >> It seems the bug is only partially fixed.  The image map behaves as
> >> expected for the help-echo and pointer properties, but doesn't report
> >> the correct hot spot ID.  The updated recipe below illustrates this:
> > 
> > Sorry, I don't understand what that means.
> > 
> > Would you please accompany the code with some minimal description of
> > how to produce the wrong result (and explanation why you think it's
> > wrong)?  The previous example was already somewhat of a riddle, but at
> > least with the wrong help-echo shown it was relatively easy to guess
> > what was expected.  This time I'm completely stomped: what is "hot
> > spot ID" and how do I see it?
> > 
> > Thanks.
> 
> Sorry for not being precise enough.
> 
> The hot spot ID is documented in the Elisp manual:
> 
> ‘:map MAP’
>       This associates an image map of “hot spots” with this image.
> 
>       An image map is an alist where each element has the format ‘(AREA
>       ID PLIST)’.  An AREA is specified as either a rectangle, a circle,
>       or a polygon.
> 
>       [...]
>   
>       When you click the mouse when the mouse pointer is over a hot-spot,
>       an event is composed by combining the ID of the hot-spot with the
>       mouse event; for instance, ‘[area4 mouse-1]’ if the hot-spot's ID
>       is ‘area4’.
> 
> In my example, each colored rectangle RED, GREEN, BLUE corresponds to
> a `rect' hot spot with the respective IDs: r, g, b.  And Each <ID
> mouse-1> key is associated to a command that displays the color name
> of the rectangle you click on.
> 
> So, when you click on the red rectangle you should see "Red" is the
> echo area, "Green" when you click on the green rectangle, and "Blue"
> when you click on the blue rectangle.
> 
> But on the sliced image which is on the left side on the header line,
> showing a green and blue rectangle, a click on the green rectangle
> displays "Red" instead of "Green" and click on the blue rectangle
> displays "Green" instead of "Blue".  This is the issue.
> 
> Hope I am clear enough.

Yes, thanks.  Should be fixed now on the master branch.