From: Mattias EngdegÄrd Date: Mon, 9 Oct 2023 15:18:17 +0000 (+0200) Subject: Don't allow Services entries in pop-up menus on macOS (bug#66420) X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~3930 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=156392fee547dc07363b425f5226cfa0f28f6105;p=emacs.git 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. --- 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;