[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c0fa3f2a6b: Prevent menu items leak if x-pre-popup-menu-hook sign
From: |
Po Lu |
Subject: |
master c0fa3f2a6b: Prevent menu items leak if x-pre-popup-menu-hook signals |
Date: |
Thu, 17 Feb 2022 05:06:32 -0500 (EST) |
branch: master
commit c0fa3f2a6b8ce06af59f5e70cf1757189bd401f0
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Prevent menu items leak if x-pre-popup-menu-hook signals
* src/menu.c (x_popup_menu_1): Make sure menu items are
discarded if the pre popup menu hook signals.
---
src/menu.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/menu.c b/src/menu.c
index ad4e3abe9f..398bf9329f 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1391,9 +1391,7 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
}
#endif
-#ifdef HAVE_NS /* FIXME: ns-specific, why? --Stef */
record_unwind_protect_void (discard_menu_items);
-#endif
run_hook (Qx_pre_popup_menu_hook);
@@ -1404,11 +1402,7 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
selection = FRAME_TERMINAL (f)->menu_show_hook (f, xpos, ypos, menuflags,
title, &error_name);
-#ifdef HAVE_NS
unbind_to (specpdl_count, Qnil);
-#else
- discard_menu_items ();
-#endif
#ifdef HAVE_NTGUI /* W32 specific because other terminals clear
the grab inside their `menu_show_hook's if
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master c0fa3f2a6b: Prevent menu items leak if x-pre-popup-menu-hook signals,
Po Lu <=