STR #1109 re-fix: when fixing 1109, I accidentally enabled clicking on grayed out menu items. This commit should fix that an make the menu ignore grayed out items altogether.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4763 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-01-16 23:22:32 +00:00
parent 1a12cf01d2
commit 42a6245bdd
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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'},