unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Artur Malabarba <bruce.connor.am@gmail.com>, 22870@debbugs.gnu.org
Subject: bug#22870: 25.0.91; Mouse-clicks fail on button overlays with display properties
Date: Thu, 10 Oct 2019 12:43:07 +0200	[thread overview]
Message-ID: <CADwFkmnOb4zcQXvAhbP-8GsfhQ+fcKBFTBnZ9jn35SgtcURs-g@mail.gmail.com> (raw)
In-Reply-To: <83k19csxg0.fsf@gnu.org>

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	other threads:[~2019-10-10 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 17:00 bug#22870: 25.0.91; Mouse-clicks fail on button overlays with display properties Artur Malabarba
2019-10-09 16:21 ` Stefan Kangas
2019-10-10 10:32   ` Eli Zaretskii
2019-10-10 10:43     ` Stefan Kangas [this message]
2020-09-20 20:18 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmnOb4zcQXvAhbP-8GsfhQ+fcKBFTBnZ9jn35SgtcURs-g@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=22870@debbugs.gnu.org \
    --cc=bruce.connor.am@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).