mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 11:27:34 +00:00
* src/keyboard.c (make_lispy_event): Generate proper tool-bar events.
Generate events which carry the location info. * src/xdisp.c (handle_tool_bar_click): Don't emit dummy "prefix" events.
This commit is contained in:
parent
36df5e74d1
commit
3b4bd4be1d
2 changed files with 7 additions and 15 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -14322,11 +14322,6 @@ handle_tool_bar_click (struct frame *f, int x, int y, bool down_p,
|
|||
key = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_KEY);
|
||||
|
||||
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;
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue