From 42a6245bdd5bf7fa3a03f1cd82b1c7013c5be7c9 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 16 Jan 2006 23:22:32 +0000 Subject: 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 --- src/Fl_Menu.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3