# HG changeset patch # User Jan Dj¸«£rv # Date 1186220907 0 # Node ID 52d28c9f374b36419175593033a3412937da1a48 # Parent c1afebeec697c29f096ffdde6be3346ac987e48a (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s, add comment explaining why. diff -r c1afebeec697 -r 52d28c9f374b src/gtkutil.c --- a/src/gtkutil.c Sat Aug 04 04:44:00 2007 +0000 +++ b/src/gtkutil.c Sat Aug 04 09:48:27 2007 +0000 @@ -3372,8 +3372,16 @@ key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); XSETFRAME (frame, f); + + /* We generate two events here. The first one is to set the prefix + to `(tool_bar)', see keyboard.c. */ 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; /* Convert between the modifier bits GDK uses and the modifier bits Emacs uses. This assumes GDK an X masks are the same, which they are when