all repos — fluxbox @ b9e39764f3ad2dbb3c2496e69adb68c558e2ea48

custom fork of the fluxbox windowmanager

more little changes to typeahead (thanks Matteo, plus changes from me)
markt markt
commit

b9e39764f3ad2dbb3c2496e69adb68c558e2ea48

parent

0d02b9bdf3da69744d8103de76b16969e3a069b1

1 files changed, 16 insertions(+), 16 deletions(-)

jump to
M src/FbTk/Menu.ccsrc/FbTk/Menu.cc

@@ -352,21 +352,10 @@ submenu->cycleItems(false);

} void Menu::enterParent() { - if (parent() == 0) - return; - - if (validIndex(m_active_index)) { - Menu *submenu = menuitems[m_active_index]->submenu(); - if (submenu) - submenu->internal_hide(); - } - - m_active_index = -1; - // hide self - m_visible = false; - menu.window.hide(); + internal_hide(); // return focus to parent - parent()->grabInputFocus(); + if (parent()) + parent()->grabInputFocus(); } void Menu::disableTitle() {

@@ -1038,6 +1027,11 @@ m_type_ahead.reset();

hide(); break; case XK_BackSpace: + if (m_type_ahead.stringSize() == 0) { + enterParent(); + break; + } + m_type_ahead.putBackSpace(); drawTypeAheadItems(); break;

@@ -1059,8 +1053,14 @@ }

break; case XK_Tab: case XK_ISO_Left_Tab: - m_type_ahead.seek(); - cycleItems((bool)(event.state & ShiftMask)); + if (validIndex(m_active_index) && isItemEnabled(m_active_index) && + menuitems[m_active_index]->submenu() && m_matches.size() == 1) { + enterSubmenu(); + m_type_ahead.reset(); + } else { + m_type_ahead.seek(); + cycleItems((bool)(event.state & ShiftMask)); + } drawTypeAheadItems(); break; default: