mirror of
https://github.com/fltk/fltk.git
synced 2026-02-06 00:01:57 +08:00
Improve implementation of the macOS Window menu
The macOS Window menu is connected to the item array of the macOS menubar via FL_SUBMENU_POINTER. This facilitates memorization of pointers to items of the macOS menubar because the item array no longer changes each time a window opens of gets closed.
This commit is contained in:
@@ -202,8 +202,7 @@ void menu_location_cb(Fl_Widget* w, void* data)
|
||||
smenubar->callback(test_cb);
|
||||
}
|
||||
else { // switch to window menu bar
|
||||
menubar->menu(smenubar->menu());
|
||||
smenubar->clear();
|
||||
menubar->copy(smenubar->menu());
|
||||
delete smenubar;
|
||||
menubar->show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user