Subject: bug#76620: 30.1.50; mouse-1 mode-line bindings are unusable when point is on a button

From: Eli Zaretskii <[email-masked]>
Date: Sat, 30 Aug 2025 17:05:49 +0300

> From: Spencer Baugh <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Sat, 30 Aug 2025 09:37:46 -0400
> 
> When you click on a part of the mode line which is after the end of
> mode-line-format, (at least on GNU/Linux) you get an event like this:
> 
> (down-mouse-1 (#<window 3 on *Bugs*> mode-line (2379 . 2071) 21536370
>  nil nil (157 . 88) nil (8 . 19) (15 . 32)))
> 
> posn-string is nil for this but it's still in the mode-line.  My change
> checks for whether a position is in the mode-line before checking if
> posn-string is nil, so it catches such events.

Btw, please make sure to test on TTY frames as well, AFAICT the format
of the event there is somewhat different, since there's no "end of
mode-line-format" on TTYs.