From c005f9956f0a241209dd1b0ebfed9beba79ec3e5 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 2 Feb 2007 15:14:42 +0000 Subject: Added glut files to vc2005 solution. Fixed popup menus that would not stay popped up when clicke once and the first item was disabled. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index f0739e9a0..b8337d4d6 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -718,14 +718,6 @@ int menuwindow::early_hide_handle(int e) { pp.state = PUSH_STATE; }} return 1; case FL_RELEASE: - // do nothing if they try to pick inactive items - if (pp.current_item && !pp.current_item->activevisible()) { - 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 // the second click (not the one that popped up the menu): if (!Fl::event_is_click() || pp.state == PUSH_STATE || @@ -738,6 +730,8 @@ int menuwindow::early_hide_handle(int e) { pp.p[pp.menu_number]->redraw(); } else #endif + // do nothing if they try to pick inactive items + if (!pp.current_item || pp.current_item->activevisible()) pp.state = DONE_STATE; } return 1; -- cgit v1.2.3