Subject: bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)

From: Stefan Kangas <[email-masked]>
Date: Mon, 9 Oct 2023 12:44:40 +0000

Gerd Möllmann <[email-masked]> writes:

>> The patch below removes it. The property is documented to be present in macOS 10.6 and above, which is fairly old (Snow Leopard).

That's also the oldest version of macOS that we support, so that should
be fine.

>> --- a/src/nsmenu.m
>> +++ b/src/nsmenu.m
>> @@ -768,6 +768,9 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
>>                              pressure: 0];
>>
>>    context_menu_value = -1;
>> +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
>> +  self.allowsContextMenuPlugIns = NO;
>> +#endif
>>    [NSMenu popUpContextMenu: self withEvent: event forView: view];
>>    retVal = context_menu_value;
>>    context_menu_value = 0;
>
> I'm all for it :-)

+1