[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41343: tab-bar-mode: Close tab on mouse-2 click
From: |
Juri Linkov |
Subject: |
bug#41343: tab-bar-mode: Close tab on mouse-2 click |
Date: |
Fri, 06 Aug 2021 11:20:29 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>> It's too late to change how keys are implemented for tab-bar.
>> The tab-bar keymap contains such keys as 'tab-1' and 'C-tab-2',
>> and clicking mouse-1 on tabs emits such events. It doesn't emit
>> 'mouse-1' and 'mouse-2'.
>
> How do we translate mouse clicks into the likes of C-tab-2?
When mouse-1 is clicked on the close button, then the
Control modifier 'C-' is added to the menu-item symbol tab-2
emitted as an event.
> And what prevents us from emitting something like tab-close-2 when
> mouse-2 is clicked?
Then mouse-2 is still hard-coded and tab-close-2 is not much different
from the previous patch that emits C-tab-2.
Or in "tab-close-2" what does "2" mean: the button number 2 (mouse-2),
or the tab number 2 (tab-2)?
Should they then cover all combinations? tab-1-mouse-1,
tab-1-mouse-2, tab-2-mouse-1, tab-2-mouse-2, ...
>> It should be possible to implement normal key bindings mouse-1/mouse-2,
>> but such change will not be backward-compatible.
>
> In what way will it be incompatible?
Currently tab-bar-make-keymap returns a keymap with menu-items.
This is like menu-bar is implemented. The menu-bar displays
menu-items, and clicking on them emits events with their symbols.
The tool-bar is implemented the same way: it displays
menu-items, and clicking emits their symbols.
The tab-bar is exactly the same: displays menu-items
on the tab-bar, and clicking mouse-1 emits events
with tab names, e.g. tab-2.
Users already are using such add-advice that expect
tab-bar-make-keymap returning a keymap with menu-items.
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/03
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Eli Zaretskii, 2021/08/04
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/04
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Eli Zaretskii, 2021/08/05
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/05
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Eli Zaretskii, 2021/08/06
- bug#41343: tab-bar-mode: Close tab on mouse-2 click,
Juri Linkov <=
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Eli Zaretskii, 2021/08/06
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/09
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Eli Zaretskii, 2021/08/10
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/11
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Eli Zaretskii, 2021/08/11
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/12
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Eli Zaretskii, 2021/08/12
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/13
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Juri Linkov, 2021/08/18
- bug#41343: tab-bar-mode: Close tab on mouse-2 click, Stefan Kangas, 2021/08/24