emacs-diffs
[Top][All Lists]
Advanced

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

master 156392fee54: Don't allow Services entries in pop-up menus on macO


From: Mattias Engdegård
Subject: master 156392fee54: Don't allow Services entries in pop-up menus on macOS (bug#66420)
Date: Mon, 9 Oct 2023 11:41:08 -0400 (EDT)

branch: master
commit 156392fee547dc07363b425f5226cfa0f28f6105
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Don't allow Services entries in pop-up menus on macOS (bug#66420)
    
    * src/nsmenu.m ([EmacsMenu runMenuAt:forFrame:keymaps:]):
    Prevent the system from adding context menu plug-ins
    (Services entries or sub-menu) to all our pop-up menus.
---
 src/nsmenu.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/nsmenu.m b/src/nsmenu.m
index 4a86864176d..fb356c6b861 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -768,6 +768,10 @@ prettify_key (const char *key)
                             pressure: 0];
 
   context_menu_value = -1;
+#ifdef NS_IMPL_COCOA
+  /* Don't let the system add a Services menu here.  */
+  self.allowsContextMenuPlugIns = NO;
+#endif
   [NSMenu popUpContextMenu: self withEvent: event forView: view];
   retVal = context_menu_value;
   context_menu_value = 0;



reply via email to

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