int, int, bool, int);
extern void handle_tool_bar_click (struct frame *,
int, int, bool, int);
+extern void handle_tool_bar_click_with_device (struct frame *, int, int, bool,
+ int, Lisp_Object);
extern void expose_frame (struct frame *, int, int, int, int);
extern bool gui_intersect_rectangles (const Emacs_Rectangle *,
Handle mouse button event on the tool-bar of frame F, at
frame-relative coordinates X/Y. DOWN_P is true for a button press,
false for button release. MODIFIERS is event modifiers for button
- release. */
+ release. DEVICE is the device the click came from, or Qt. */
void
-handle_tool_bar_click (struct frame *f, int x, int y, bool down_p,
- int modifiers)
+handle_tool_bar_click_with_device (struct frame *f, int x, int y, bool down_p,
+ int modifiers, Lisp_Object device)
{
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
struct window *w = XWINDOW (f->tool_bar_window);
event.frame_or_window = frame;
event.arg = key;
event.modifiers = modifiers;
+ event.device = device;
kbd_buffer_store_event (&event);
f->last_tool_bar_item = -1;
}
}
+void
+handle_tool_bar_click (struct frame *f, int x, int y, bool down_p,
+ int modifiers)
+{
+ handle_tool_bar_click_with_device (f, x, y, down_p, modifiers, Qt);
+}
/* Possibly highlight a tool-bar item on frame F when mouse moves to
tool-bar window-relative coordinates X/Y. Called from
tool_bar_p = EQ (window, f->tool_bar_window);
if (tool_bar_p && xev->detail < 4)
- handle_tool_bar_click
+ handle_tool_bar_click_with_device
(f, x, y, xev->evtype == XI_ButtonPress,
- x_x_to_emacs_modifiers (dpyinfo, bv.state));
+ x_x_to_emacs_modifiers (dpyinfo, bv.state),
+ source ? source->name : Qt);
}
#endif /* !USE_GTK */