diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-04-01 17:00:51 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-04-01 17:00:56 +0200 |
| commit | f4978a014997656b4592c2b3b866865f76d390ea (patch) | |
| tree | 13a365c34b705942195c75fd3186801976786070 /src/Fl_MacOS_Sys_Menu_Bar.mm | |
| parent | 0eb6bb8e6d34b39399cda8b768851a3218eb7e2c (diff) | |
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
Diffstat (limited to 'src/Fl_MacOS_Sys_Menu_Bar.mm')
| -rw-r--r-- | src/Fl_MacOS_Sys_Menu_Bar.mm | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
