FL_MENU_TOGGLE/RADIO items do not update in macOS menu bar (#916)

This commit is contained in:
ManoloFLTK 2024-02-20 18:41:12 +01:00
parent ba5ed296e9
commit 69d7991acc
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,10 @@ Fl_Sys_Menu_Bar::Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l)
if (fl_sys_menu_bar) delete fl_sys_menu_bar; if (fl_sys_menu_bar) delete fl_sys_menu_bar;
fl_sys_menu_bar = this; fl_sys_menu_bar = this;
driver()->bar = this; driver()->bar = this;
// Remove macOS menubar from its parent Fl_Group so it's activated
// by system menu shortcuts
Fl_Group *p = parent();
if (p) p->remove(this);
} }
} }