emacs-diffs
[Top][All Lists]
Advanced

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

master f980eed4c1: Fix crashes and other bugs on LessTif


From: Po Lu
Subject: master f980eed4c1: Fix crashes and other bugs on LessTif
Date: Tue, 1 Mar 2022 06:16:38 -0500 (EST)

branch: master
commit f980eed4c1b49393fb46f04538f2a9046cdfab2b
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix crashes and other bugs on LessTif
    
    * lwlib/lwlib-Xm.c (make_menu_in_widget): XmIsRowColumn is
    broken on the latest LessTif release, so avoid that here.
    * src/xfns.c (x_window): Add PropertyChangeMask which LessTif
    doesn't do itself.
---
 lwlib/lwlib-Xm.c | 2 ++
 src/xfns.c       | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c
index 1b8675c0ed..a1114d4255 100644
--- a/lwlib/lwlib-Xm.c
+++ b/lwlib/lwlib-Xm.c
@@ -496,9 +496,11 @@ make_menu_in_widget (widget_instance* instance,
     ;
   children = (Widget*)(void*)XtMalloc (num_children * sizeof (Widget));
 
+#ifndef LESSTIF_VERSION
   /* WIDGET should be a RowColumn.  */
   if (!XmIsRowColumn (widget))
     emacs_abort ();
+#endif
 
   /* Determine whether WIDGET is a menu bar.  */
   type = -1;
diff --git a/src/xfns.c b/src/xfns.c
index 65218b3fc0..09bad71502 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3803,8 +3803,13 @@ x_window (struct frame *f, long window_prompting)
                   FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
                   XA_ATOM, 32, PropModeAppend, NULL, 0);
 
+#if !defined USE_MOTIF || !defined HAVE_XINPUT2
   /* Make all the standard events reach the Emacs frame.  */
   attributes.event_mask = STANDARD_EVENT_SET;
+#else
+  /* This is used for Motif menus.  */
+  attributes.event_mask = STANDARD_EVENT_SET | PropertyChangeMask;
+#endif
 
 #ifdef HAVE_X_I18N
   if (FRAME_XIC (f))



reply via email to

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