From: Dana Jansens Date: Fri, 8 Jan 2010 14:00:00 +0000 (-0500) Subject: Use submenuShowDelay when navigating menus with the keyboard X-Git-Tag: mikabox-3.5-7~349^2~21 X-Git-Url: http://git.openbox.org/?p=mikachu%2Fopenbox.git;a=commitdiff_plain;h=70c074afe84ddbe4058f67a1fce062a769b449fc Use submenuShowDelay when navigating menus with the keyboard --- diff --git a/openbox/event.c b/openbox/event.c index ad9dade..58e947f 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1712,7 +1712,11 @@ static gboolean event_handle_menu_keyboard(XEvent *ev) else if (ob_keycode_match(keycode, OB_KEY_RIGHT)) { /* Right goes to the selected submenu */ - if (frame->child) menu_frame_select_next(frame->child); + if (frame->selected->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) { + /* make sure it is visible */ + menu_frame_select(frame, frame->selected, TRUE); + menu_frame_select_next(frame->child); + } ret = TRUE; } diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 076fe6e..3d2b430 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1289,7 +1289,7 @@ void menu_frame_select_previous(ObMenuFrame *self) } } } - menu_frame_select(self, it ? it->data : NULL, TRUE); + menu_frame_select(self, it ? it->data : NULL, FALSE); } void menu_frame_select_next(ObMenuFrame *self) @@ -1314,5 +1314,5 @@ void menu_frame_select_next(ObMenuFrame *self) } } } - menu_frame_select(self, it ? it->data : NULL, TRUE); + menu_frame_select(self, it ? it->data : NULL, FALSE); }