bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39808: 28.0.50; toolbar broken


From: Stefan Monnier
Subject: bug#39808: 28.0.50; toolbar broken
Date: Thu, 27 Feb 2020 11:19:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Iʼve bisected this down to:
>
> 3b4bd4be1dfa8717cb6911bd57c4c7d9d13614b4
>
> * 3b4bd4be1d (HEAD, refs/bisect/bad) * src/keyboard.c (make_lispy_event):
> Generate proper tool-bar events.
> |     - Stefan Monnier <address@hidden>

Looks like my grep-fu was very weak, indeed.
I installed the patch below, which should hopefully fix the problem for
Gtk and NS builds,


        Stefan


diff --git a/src/gtkutil.c b/src/gtkutil.c
index 5e7cf3d211..338c6036c2 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 c0535825ee..aefbb2721e 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8185,12 +8185,6 @@ - (instancetype)toolbarClicked: (id)item
   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,






reply via email to

[Prev in Thread] Current Thread [Next in Thread]