Making a menu_bar submenu close when the menu_bar loses focus
"'pvr...
Sep 15, 2020
When I open a top-level sub-menu in my Fl_Menu_Bar I then find that it stays dropped down when I move focus away from the menu_bar. The only times it doesn't is if 1) I pass the mouse over another menu item, in which case the second sub-menu drops down, or 2) I click on the menu_bar away from any menu items. This has the effect that all other events in my app seem to be blocked, especially the app close event which is the most infuriating.
I presume I need to handle the UNFOCUS event in the menu_bar, but how do I cause the sub-menu to close.
Alternaively I would like to generate a system noise alert that window close is being ignored.
I am using a recent (23/4/2020) snap-shot of 1.4 on W10 (2004
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.