From f4978a014997656b4592c2b3b866865f76d390ea Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 1 Apr 2025 17:00:51 +0200 Subject: Adding the FL_MENU_CHATTY flag to Fl_Menu_Item. If set, menu items will also call the callback when highlighting changes. The reason is given with Fl::callback_reason(). #941 --- src/Fl_MacOS_Sys_Menu_Bar.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_MacOS_Sys_Menu_Bar.mm') diff --git a/src/Fl_MacOS_Sys_Menu_Bar.mm b/src/Fl_MacOS_Sys_Menu_Bar.mm index b76deb27e..87c5089cd 100644 --- a/src/Fl_MacOS_Sys_Menu_Bar.mm +++ b/src/Fl_MacOS_Sys_Menu_Bar.mm @@ -167,7 +167,7 @@ const char *Fl_Mac_App_Menu::quit = "Quit %@"; { fl_lock_function(); Fl_Menu_Item *item = (Fl_Menu_Item *)[(NSData*)[self representedObject] bytes]; - if ( item && item->callback() ) item->do_callback(NULL); + if ( item && item->callback() ) item->do_callback(NULL, FL_REASON_SELECTED); fl_unlock_function(); } - (void) setKeyEquivalentModifierMask:(int)value -- cgit v1.2.3