diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-02-21 10:50:08 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-02-21 10:50:08 -0500 |
commit | 1cb14aaba57e5842403733650cef99022a3f8667 (patch) | |
tree | c7c6737ddd40d2ff0b89a165bbfab8d5de5e725a | |
parent | 3b4bd4be1dfa8717cb6911bd57c4c7d9d13614b4 (diff) | |
download | emacs-1cb14aaba57e5842403733650cef99022a3f8667.tar.gz |
* src/keyboard.c: Copy last tool-bar change to tab-bar.
(make_lispy_event) <TAB_BAR_EVENT>: Make event with proper location info.
* src/xdisp.c (handle_tab_bar_click, tty_handle_tab_bar_click): Don't
emit dummy "prefix" event.
-rw-r--r-- | src/keyboard.c | 13 | ||||
-rw-r--r-- | src/xdisp.c | 10 |
2 files changed, 3 insertions, 20 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 913a4d344b2..9ce168c6dd0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5998,20 +5998,13 @@ make_lispy_event (struct input_event *event) return list2 (Qselect_window, list1 (event->frame_or_window)); case TAB_BAR_EVENT: - if (EQ (event->arg, event->frame_or_window)) - /* This is the prefix key. We translate this to - `(tab_bar)' because the code in keyboard.c for tab bar - events, which we use, relies on this. */ - return list1 (Qtab_bar); - else if (SYMBOLP (event->arg)) - return apply_modifiers (event->modifiers, event->arg); - return event->arg; - case TOOL_BAR_EVENT: { Lisp_Object res = event->arg; + Lisp_Object location + = event->kind == TAB_BAR_EVENT ? Qtab_bar : Qtool_bar; if (SYMBOLP (res)) res = apply_modifiers (event->modifiers, res); - return list2 (res, list2 (event->frame_or_window, Qtool_bar)); + return list2 (res, list2 (event->frame_or_window, location)); } case USER_SIGNAL_EVENT: diff --git a/src/xdisp.c b/src/xdisp.c index 682399f13e7..c2aa314c1ad 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13358,11 +13358,6 @@ handle_tab_bar_click (struct frame *f, int x, int y, bool down_p, XSETFRAME (frame, f); event.kind = TAB_BAR_EVENT; event.frame_or_window = frame; - event.arg = frame; - kbd_buffer_store_event (&event); - - event.kind = TAB_BAR_EVENT; - event.frame_or_window = frame; event.arg = key; event.modifiers = close_p ? ctrl_modifier | modifiers : modifiers; kbd_buffer_store_event (&event); @@ -13538,11 +13533,6 @@ tty_handle_tab_bar_click (struct frame *f, int x, int y, bool down_p, XSETFRAME (frame, f); event->kind = TAB_BAR_EVENT; event->frame_or_window = frame; - event->arg = frame; - kbd_buffer_store_event (event); - - event->kind = TAB_BAR_EVENT; - event->frame_or_window = frame; event->arg = key; if (close_p) event->modifiers |= ctrl_modifier; |