diff options
-rw-r--r-- | src/keyboard.c | 13 | ||||
-rw-r--r-- | src/xdisp.c | 9 |
2 files changed, 7 insertions, 15 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 9dd7e00709e..913a4d344b2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -6008,14 +6008,11 @@ make_lispy_event (struct input_event *event) return event->arg; case TOOL_BAR_EVENT: - if (EQ (event->arg, event->frame_or_window)) - /* This is the prefix key. We translate this to - `(tool_bar)' because the code in keyboard.c for tool bar - events, which we use, relies on this. */ - return list1 (Qtool_bar); - else if (SYMBOLP (event->arg)) - return apply_modifiers (event->modifiers, event->arg); - return event->arg; + { + Lisp_Object res = event->arg; + if (SYMBOLP (res)) res = apply_modifiers (event->modifiers, res); + return list2 (res, list2 (event->frame_or_window, Qtool_bar)); + } case USER_SIGNAL_EVENT: /* A user signal. */ diff --git a/src/xdisp.c b/src/xdisp.c index e41ceaf0bb7..682399f13e7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14324,11 +14324,6 @@ handle_tool_bar_click (struct frame *f, int x, int y, bool down_p, XSETFRAME (frame, f); event.kind = TOOL_BAR_EVENT; event.frame_or_window = frame; - event.arg = frame; - kbd_buffer_store_event (&event); - - event.kind = TOOL_BAR_EVENT; - event.frame_or_window = frame; event.arg = key; event.modifiers = modifiers; kbd_buffer_store_event (&event); @@ -29230,7 +29225,7 @@ produce_stretch_glyph (struct it *it) /* Compute the width of the stretch. */ if ((prop = Fplist_get (plist, QCwidth), !NILP (prop)) - && calc_pixel_width_or_height (&tem, it, prop, font, true, 0)) + && calc_pixel_width_or_height (&tem, it, prop, font, true, NULL)) { /* Absolute width `:width WIDTH' specified and valid. */ zero_width_ok_p = true; @@ -29286,7 +29281,7 @@ produce_stretch_glyph (struct it *it) int default_height = normal_char_height (font, ' '); if ((prop = Fplist_get (plist, QCheight), !NILP (prop)) - && calc_pixel_width_or_height (&tem, it, prop, font, false, 0)) + && calc_pixel_width_or_height (&tem, it, prop, font, false, NULL)) { height = (int)tem; zero_height_ok_p = true; |