bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22870: 25.0.91; Mouse-clicks fail on button overlays with display pr


From: Stefan Kangas
Subject: bug#22870: 25.0.91; Mouse-clicks fail on button overlays with display properties
Date: Thu, 10 Oct 2019 12:43:07 +0200

Eli Zaretskii <eliz@gnu.org> writes:

> > It seems like it was broken by this commit:
> > 24fc948039 2012-12-06 * lisp/button.el: Make them work in header-lines.
>
> Can you sport which part(s) of that change broke this?

Yes, this part:

@@ -417,11 +444,13 @@ push-button
       ;; POS is a mouse event; switch to the proper window/buffer
       (let ((posn (event-start pos)))
        (with-current-buffer (window-buffer (posn-window posn))
-     (push-button (posn-point posn) t)))
+   (if (posn-area posn)
+       ;; mode-line or header-line event
+       (button-activate (car (posn-string posn)) t)
+     (push-button (posn-point posn)) t)))

(car (posn-string posn))  -- changed to (posn-string posn) in commit
4b0df8483 means that in button-activate, the following expression
returns nil:

(or (and use-mouse-action (button-get button 'mouse-action))
            (button-get button 'action))

Best regards,
Stefan Kangas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]