diff options
| author | Stefan Monnier | 2020-02-21 10:50:08 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2020-02-21 10:50:08 -0500 |
| commit | 1cb14aaba57e5842403733650cef99022a3f8667 (patch) | |
| tree | c7c6737ddd40d2ff0b89a165bbfab8d5de5e725a /src | |
| parent | 3b4bd4be1dfa8717cb6911bd57c4c7d9d13614b4 (diff) | |
| download | emacs-1cb14aaba57e5842403733650cef99022a3f8667.tar.gz emacs-1cb14aaba57e5842403733650cef99022a3f8667.zip | |
* 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.
Diffstat (limited to 'src')
| -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) | |||
| 5998 | return list2 (Qselect_window, list1 (event->frame_or_window)); | 5998 | return list2 (Qselect_window, list1 (event->frame_or_window)); |
| 5999 | 5999 | ||
| 6000 | case TAB_BAR_EVENT: | 6000 | case TAB_BAR_EVENT: |
| 6001 | if (EQ (event->arg, event->frame_or_window)) | ||
| 6002 | /* This is the prefix key. We translate this to | ||
| 6003 | `(tab_bar)' because the code in keyboard.c for tab bar | ||
| 6004 | events, which we use, relies on this. */ | ||
| 6005 | return list1 (Qtab_bar); | ||
| 6006 | else if (SYMBOLP (event->arg)) | ||
| 6007 | return apply_modifiers (event->modifiers, event->arg); | ||
| 6008 | return event->arg; | ||
| 6009 | |||
| 6010 | case TOOL_BAR_EVENT: | 6001 | case TOOL_BAR_EVENT: |
| 6011 | { | 6002 | { |
| 6012 | Lisp_Object res = event->arg; | 6003 | Lisp_Object res = event->arg; |
| 6004 | Lisp_Object location | ||
| 6005 | = event->kind == TAB_BAR_EVENT ? Qtab_bar : Qtool_bar; | ||
| 6013 | if (SYMBOLP (res)) res = apply_modifiers (event->modifiers, res); | 6006 | if (SYMBOLP (res)) res = apply_modifiers (event->modifiers, res); |
| 6014 | return list2 (res, list2 (event->frame_or_window, Qtool_bar)); | 6007 | return list2 (res, list2 (event->frame_or_window, location)); |
| 6015 | } | 6008 | } |
| 6016 | 6009 | ||
| 6017 | case USER_SIGNAL_EVENT: | 6010 | 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, | |||
| 13358 | XSETFRAME (frame, f); | 13358 | XSETFRAME (frame, f); |
| 13359 | event.kind = TAB_BAR_EVENT; | 13359 | event.kind = TAB_BAR_EVENT; |
| 13360 | event.frame_or_window = frame; | 13360 | event.frame_or_window = frame; |
| 13361 | event.arg = frame; | ||
| 13362 | kbd_buffer_store_event (&event); | ||
| 13363 | |||
| 13364 | event.kind = TAB_BAR_EVENT; | ||
| 13365 | event.frame_or_window = frame; | ||
| 13366 | event.arg = key; | 13361 | event.arg = key; |
| 13367 | event.modifiers = close_p ? ctrl_modifier | modifiers : modifiers; | 13362 | event.modifiers = close_p ? ctrl_modifier | modifiers : modifiers; |
| 13368 | kbd_buffer_store_event (&event); | 13363 | kbd_buffer_store_event (&event); |
| @@ -13538,11 +13533,6 @@ tty_handle_tab_bar_click (struct frame *f, int x, int y, bool down_p, | |||
| 13538 | XSETFRAME (frame, f); | 13533 | XSETFRAME (frame, f); |
| 13539 | event->kind = TAB_BAR_EVENT; | 13534 | event->kind = TAB_BAR_EVENT; |
| 13540 | event->frame_or_window = frame; | 13535 | event->frame_or_window = frame; |
| 13541 | event->arg = frame; | ||
| 13542 | kbd_buffer_store_event (event); | ||
| 13543 | |||
| 13544 | event->kind = TAB_BAR_EVENT; | ||
| 13545 | event->frame_or_window = frame; | ||
| 13546 | event->arg = key; | 13536 | event->arg = key; |
| 13547 | if (close_p) | 13537 | if (close_p) |
| 13548 | event->modifiers |= ctrl_modifier; | 13538 | event->modifiers |= ctrl_modifier; |