enabled MenuItems / Separators are not clickable and the same logic should apply to keys.
mathias mathias
1 files changed,
3 insertions(+),
4 deletions(-)
jump to
M
src/FbTk/Menu.cc
→
src/FbTk/Menu.cc
@@ -830,10 +830,9 @@
if (index >= menuitems.size()) return false; const MenuItem *item = find(index); - if (!item) - return false; - - return (typeid(*item) != typeid(FbTk::MenuSeparator)); + return (!item || + (typeid(*item) == typeid(FbTk::MenuSeparator)) || + !item->isEnabled()) ? false : true; }