]> git.eshelyaron.com Git - emacs.git/commit
Improve tab-bar event handling (bug#41343)
authorJuri Linkov <juri@linkov.net>
Sun, 5 Sep 2021 17:16:33 +0000 (20:16 +0300)
committerJuri Linkov <juri@linkov.net>
Sun, 5 Sep 2021 17:16:33 +0000 (20:16 +0300)
commit794fdce55d097f2b58ce37818edffb2deef7b9de
tree42c14ae6326ae151f3e943d264074a2671ccda98
parentad9c57f54ae3eea9e5b2fe9264e9edb8b2ed1857
Improve tab-bar event handling (bug#41343)

* lisp/tab-bar.el (tab-bar--key-to-number): Rename from tab--key-to-number.
(tab-bar--event-to-item): New function from tab-bar-handle-mouse.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab)
(tab-bar-mouse-context-menu, tab-bar-mouse-move-tab):
Use tab-bar--event-to-item.

* src/menu.c (x_popup_menu_1): Handle Qtab_bar in the second list element.

* src/xdisp.c (tty_get_tab_bar_item): Change arg 'end' to bool 'close_p'.
(tty_get_tab_bar_item): Detect if the close button was clicked.
(tty_handle_tab_bar_click): Return a list with caption that has
text properties.
lisp/tab-bar.el
src/menu.c
src/w32term.c
src/xdisp.c
src/xterm.c