From: Dana Jansens Date: Fri, 29 Aug 2003 08:51:05 +0000 (+0000) Subject: dont keyboard nav onto disabled menu items X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=09f4a0c51a6ee5a04bffd719f4d18f762d338d43;p=chaz%2Fopenbox dont keyboard nav onto disabled menu items --- diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 0b90df6e..811d4c05 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -643,7 +643,10 @@ void menu_frame_select_previous(ObMenuFrame *self) if (it) { e = it->data; - if (e->entry->type != OB_MENU_ENTRY_TYPE_SEPARATOR) + if (e->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) + break; + if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && + e->entry->data.normal.enabled) break; } } @@ -666,7 +669,10 @@ void menu_frame_select_next(ObMenuFrame *self) if (it) { e = it->data; - if (e->entry->type != OB_MENU_ENTRY_TYPE_SEPARATOR) + if (e->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) + break; + if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && + e->entry->data.normal.enabled) break; } }