Commit d47b1579 authored by Juri Linkov's avatar Juri Linkov

Handle tab-bar clicks on a GPM-capable console.

* src/term.c (handle_one_term_event): Call tty_handle_tab_bar_click.

* src/xdisp.c (tty_handle_tab_bar_click): Force reset of up_modifier bit
from the event modifiers.

* lisp/tab-line.el (tab-line-tab-current): No need to use inverse-video
on console/xterm because the selected tab already uses inverse-video.
parent e4791f3f
Pipeline #4540 failed with stage
in 90 minutes and 1 second
......@@ -81,9 +81,7 @@
'((default
:inherit tab-line-tab)
(((class color) (min-colors 88))
:background "grey85")
(t
:inverse-video t))
:background "grey85"))
"Tab line face for tab with current buffer in selected window."
:version "27.1"
:group 'tab-line-faces)
......
......@@ -2568,6 +2568,14 @@ handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event,
else {
f->mouse_moved = 0;
term_mouse_click (&ie, event, f);
if (tty_handle_tab_bar_click (f, event->x, event->y,
(ie.modifiers & down_modifier) != 0, &ie))
{
/* tty_handle_tab_bar_click stores 2 events in the event
queue, so we are done here. */
count += 2;
return count;
}
}
done:
......
......@@ -13516,6 +13516,10 @@ tty_handle_tab_bar_click (struct frame *f, int x, int y, bool down_p,
f->last_tab_bar_item = prop_idx;
else
{
/* Force reset of up_modifier bit from the event modifiers. */
if (event->modifiers & up_modifier)
event->modifiers &= ~up_modifier;
/* Generate a TAB_BAR_EVENT event. */
Lisp_Object frame;
Lisp_Object key = AREF (f->tab_bar_items,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment