Hello,
This occurs when all the items in a menu are not selectable. For instance, when there is only one style available in the 'User styles' menu and it is selected.
Here is the backtrace which helped me to find what the problem was:
#0 std::operator==<char> (
__rhs="/home/flaxx/.fluxbox/styles/classic-catalina-blue",
__lhs="/home/flaxx/.fluxbox/styles/classic-catalina-blue")
at /usr/include/c++/9.3.0/bits/char_traits.h:317
#1 StyleMenuItem::isSelected (this=0x26ba850) at src/StyleMenuItem.cc:45
#2 0x000000000043056a in FbTk::RadioMenuItem::isEnabled (this=<optimized out>)
at src/FbTk/RadioMenuItem.hh:58
#3 0x00000000004f48d2 in FbTk::Menu::cycleItems (this=0x26b9cc0,
reverse=reverse@entry=false) at src/FbTk/Menu.cc:338
#4 0x00000000004f49a5 in FbTk::Menu::enterSubmenu (this=this@entry=0x26b1a20)
at src/FbTk/Menu.cc:380
#5 0x00000000004f61b4 in FbTk::Menu::keyPressEvent (this=0x26b1a20, event=...)
at src/FbTk/Menu.cc:1096
#6 0x000000000043aed6 in FbMenu::keyPressEvent (this=<optimized out>, ke=...)
at src/FbMenu.cc:75
#7 0x00000000004e0570 in FbTk::EventManager::dispatch (
this=0x55f240 <FbTk::EventManager::instance()::ev>, win=14682379, ev=...,
parent=parent@entry=false) at src/FbTk/EventManager.cc:180
#8 0x00000000004e067e in FbTk::EventManager::handleEvent (
this=<optimized out>, ev=...) at src/FbTk/EventManager.cc:48
#9 0x000000000049d4d1 in Fluxbox::handleEvent (this=0x2510d90,
e=0x7ffd7b291740) at src/fluxbox.cc:618
#10 0x000000000049dd4c in Fluxbox::eventLoop (this=0x2510d90)
at src/fluxbox.cc:541
#11 0x000000000041fbcf in main (argc=3, argv=0x7ffd7b291c68)
at /usr/include/c++/9.3.0/bits/unique_ptr.h:360
Detaching from program: /usr/bin/fluxbox, process 32634
[Inferior 1 (process 32634) detached]
In attachment, a patch to fix this issue.
Hope this helps.
--
SeB
Good catch!
For code clarity I would prefer an extra loop / check upfront if there is any selectable item anyways … similar to the m_items.empty() check.
If you dont mind … I ll provide patch, towards github and will provide a thanks to your patch.
But very good catch of the issue.
https://github.com/fluxbox/fluxbox/pull/70/commits/8a54c1ab241071fa1245b6f75a55b44bbfcb7d86