GNU bug report logs -
#70086
Mouse clicks in tab-bar don't call commands bound in keymap properties
Previous Next
Reported by: Adam Porter <adam <at> alphapapa.net>
Date: Sat, 30 Mar 2024 02:26:01 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #31 received at 70086 <at> debbugs.gnu.org (full text, mbox):
reopen 70086
thanks
Hi Juri,
On 5/2/24 12:55, Juri Linkov wrote:
> close 70086 30.0.50
> thanks
>
>>> Do you think this could be fixed in time for Emacs 30?
>>
>> Please try out the following patch. At least it works for your test case.
>
> I guess this patch did the right thing. So pushed now for Emacs 30.
Apologies for not replying yet, and thanks for following up. I just
tested your patch, and it almost works perfectly. The problem now is
that if there are multiple such constructs in the tab-bar, each with
their own keymap, it seems that the first one in the global-mode-string
catches the clicks that are made on the second one.
For example, given this value for global-mode-string:
((tab-bar-ecm-mode
(:propertize tab-bar-ecm-lighter keymap
(keymap
(tab-bar keymap
(mouse-1 lambda
(&rest _)
(interactive)
(message "tab-bar-ecm-lighter clicked with mouse-1"))))))
(listen-mode
(:propertize listen-mode-lighter keymap
(keymap
(tab-bar keymap
(down-mouse-3 . listen-pause)
(down-mouse-2 . listen-pause)
(down-mouse-1 . listen-pause)
(mouse-3 . listen-pause)
(mouse-2 . listen-pause)
(mouse-1 . listen-pause))
(mode-line keymap
(mouse-1 . listen-pause))))))
When I click on the text rendered by listen-mode-lighter, the lambda
from the tab-bar-ecm-lighter keymap intercepts the mouse-1 event and
prints the message rather than calling the listen-pause function.
This bug report was last modified 1 year and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.