]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't allow Services entries in pop-up menus on macOS (bug#66420)
authorMattias Engdegård <mattiase@acm.org>
Mon, 9 Oct 2023 15:18:17 +0000 (17:18 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 9 Oct 2023 15:39:32 +0000 (17:39 +0200)
* 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

index 4a86864176dea276b8220556e29efa582f7eb63a..fb356c6b8617deec702de6092cdfa38fab609da8 100644 (file)
@@ -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;