From ba5ed296e9faf92a047f68e83e9348eb43a40eec Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:00:01 +0100 Subject: 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. --- test/menubar.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/menubar.cxx') diff --git a/test/menubar.cxx b/test/menubar.cxx index e46a60be0..a0424732d 100644 --- a/test/menubar.cxx +++ b/test/menubar.cxx @@ -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(); } -- cgit v1.2.3