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. */
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;
/* 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;
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;