summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-05-07 09:34:35 +0800
committerPo Lu <luangruo@yahoo.com>2022-05-07 09:34:35 +0800
commit76233917c47e7d4ed1d283b09ec67a8dbd6cdf4b (patch)
tree0af97262281ba0b31d04805a4ae395de382e53df /src/xmenu.c
parent95ed2310155f4ddad9f10a21be8a734ed7c5200f (diff)
downloademacs-76233917c47e7d4ed1d283b09ec67a8dbd6cdf4b.tar.gz
emacs-76233917c47e7d4ed1d283b09ec67a8dbd6cdf4b.tar.bz2
emacs-76233917c47e7d4ed1d283b09ec67a8dbd6cdf4b.zip
Fix freezes with some oddball menus
* src/xmenu.c (x_activate_menubar): Clear flag if dispatching the event failed. * src/xterm.c (handle_one_xevent): Check for sensitive CascadeButton instead of row column type.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 4c8828412d3..aaf53569a72 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -677,7 +677,10 @@ x_activate_menubar (struct frame *f)
}
}
#endif
- XtDispatchEvent (f->output_data.x->saved_menu_event);
+ /* The cascade button might have been deleted, so don't activate the
+ popup if it no widget was found to dispatch to. */
+ popup_activated_flag
+ = XtDispatchEvent (f->output_data.x->saved_menu_event);
#endif
unblock_input ();