summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_Menu.cxx5
-rw-r--r--test/menubar.cxx2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index ea909bbf4..4e860e396 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -613,7 +613,10 @@ int menuwindow::handle(int e) {
case FL_RELEASE:
// do nothing if they try to pick inactive items
if (pp.current_item && !pp.current_item->activevisible()) {
- pp.state = DONE_STATE;
+ if (pp.state==INITIAL_STATE) {
+ setitem(0, -1, 0);
+ pp.state = DONE_STATE;
+ }
return 1;
}
// Mouse must either be held down/dragged some, or this must be
diff --git a/test/menubar.cxx b/test/menubar.cxx
index e0de89a9b..92eee5796 100644
--- a/test/menubar.cxx
+++ b/test/menubar.cxx
@@ -160,7 +160,7 @@ Fl_Menu_Item pulldown[] = {
{"Red", FL_ALT+'r'},
{"Green", FL_ALT+'g'},
{"Blue", FL_ALT+'b'},
- {"Strange", FL_ALT+'s'},
+ {"Strange", FL_ALT+'s', 0, 0, FL_MENU_INACTIVE},
{"&Charm", FL_ALT+'c'},
{"Truth", FL_ALT+'t'},
{"Beauty", FL_ALT+'b'},