From: Stefan Monnier Date: Thu, 27 Feb 2020 16:18:28 +0000 (-0500) Subject: * src/gtkutil.c, src/nsterm.m: Fix bug#39808 X-Git-Tag: emacs-28.0.90~7825 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c32d35e9b7777a9136e96d6805a7e5b9f48772b0;p=emacs.git * src/gtkutil.c, src/nsterm.m: Fix bug#39808 Complete 3b4bd4be1d where I apparently failed to grep properly and missed two more places where the dummy events were generated. * src/nsterm.m ([EmacsView toolbarClicked:]): * src/gtkutil.c (xg_tool_bar_callback): Don't emit dummy "prefix" events. --- diff --git a/src/gtkutil.c b/src/gtkutil.c index 5e7cf3d2114..338c6036c2c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -4398,13 +4398,6 @@ xg_tool_bar_callback (GtkWidget *w, gpointer 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; diff --git a/src/nsterm.m b/src/nsterm.m index c0535825eee..aefbb2721ef 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8185,12 +8185,6 @@ not_in_argv (NSString *arg) if (!emacs_event) return self; - /* Send first event (for some reason two needed). */ - theEvent = [[self window] currentEvent]; - emacs_event->kind = TOOL_BAR_EVENT; - XSETFRAME (emacs_event->arg, emacsframe); - EV_TRAILER (theEvent); - emacs_event->kind = TOOL_BAR_EVENT; /* XSETINT (emacs_event->code, 0); */ emacs_event->arg = AREF (emacsframe->tool_bar_items,