From 991bde0d8c15ed6064ed4064283a2b1e886401d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 4 Aug 2007 09:48:42 +0000 Subject: [PATCH] (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s, add comment explaining why. --- src/ChangeLog | 5 +++++ src/gtkutil.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 87376db4e7f..7fbc9d11ea7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-04 Jan Dj,Ad(Brv + + * gtkutil.c (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s, + add comment explaining why. + 2007-08-03 Richard Stallman * fileio.c (Fvisited_file_modtime): Use make_time. diff --git a/src/gtkutil.c b/src/gtkutil.c index f52e68b1230..29aafc013e9 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3372,8 +3372,16 @@ xg_tool_bar_callback (w, client_data) 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 -- 2.39.2