I confirm that the demo program works. However, in my use case, it doesn’t. I have a function that is used to fill both a RMB Fl_Menu_Button and the Fl_Menu_Bar (in this case Fl_Sys_Menu_Bar). I fill the menu using the base class Fl_Menu_, like:
void ImageView::fill_menu( Fl_Menu_* menu )
{
menu->clear();
int idx = 1;
menu->add( _("File/Open/Movie or Sequence"),
kOpenImage.hotkey(),
(Fl_Callback*)open_cb, browser() );
menu->add( _("File/Open/Single Image"), kOpenSingleImage.hotkey(),
(Fl_Callback*)open_single_cb, browser() );
mrv::media fg = foreground();
if ( !fg )
{
menu->add( _("File/Open/Directory"), kOpenDirectory.hotkey(),
(Fl_Callback*)open_dir_cb, browser() );
menu->add( _("File/Open/Session"),
kOpenSession.hotkey(),
(Fl_Callback*)open_session_cb, browser() );
}
….etc….
}
What happens is that the Fl_Sys_Menu_Bar is filled once, but when the function is called again, it does not clear it.