master 902f8eb6334: Fix freeze in NS event handling (bug#81510)

Alan Third <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit 902f8eb6334b49e08d7dd6ba6e4b4036175bd889
Author: Alan Third <[email protected]>
Commit: Alan Third <[email protected]>

    Fix freeze in NS event handling (bug#81510)
    
    * src/nsterm.m (EV_TRAILER): Don't queue event if it's of kind
    'NO_EVENT'.
---
 src/nsterm.m | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 2c6954f0264..20967b7581f 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -446,10 +446,11 @@ ev_modifiers_helper (unsigned int flags, unsigned int left_mask,
 /* This is a piece of code which is common to all the event handling
    methods.  Maybe it should even be a function.  */
 #define EV_TRAILER(e)						\
-  {								\
-    XSETFRAME (emacs_event->frame_or_window, emacsframe);	\
-    EV_TRAILER2 (e);						\
-  }
+  if (emacs_event->kind != NO_EVENT)				\
+    {								\
+      XSETFRAME (emacs_event->frame_or_window, emacsframe);	\
+      EV_TRAILER2 (e);						\
+    }
 
 #define EV_TRAILER2(e)                                                  \
   {                                                                     \
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.