summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-12-09 09:42:57 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-12-09 09:42:57 +0100
commit80c94ebfdf368255bf0869fdd1b06d2ea4aeb0e5 (patch)
treef42f3b143d1965f990100c5c6dfb0da7f16cc55a /src/Fl_Menu.cxx
parentc82165cb074b39b63f3e0d873902d76fc4615292 (diff)
Fix: Mouse hover+Enter key selects inactive menu items (#1159)
Diffstat (limited to 'src/Fl_Menu.cxx')
-rw-r--r--src/Fl_Menu.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 6332673da..983b260f6 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -842,7 +842,7 @@ int menuwindow::handle_part1(int e) {
if (pp.current_item && (!pp.menubar || pp.menu_number > 0) &&
pp.current_item->activevisible() && pp.current_item->submenu() && !pp.current_item->callback_)
goto RIGHT;
- pp.state = DONE_STATE;
+ if (pp.current_item && pp.current_item->activevisible()) pp.state = DONE_STATE;
return 1;
case FL_Escape:
setitem(0, -1, 0);