dont keyboard nav onto disabled menu items
This commit is contained in:
parent
7317d17c76
commit
09f4a0c51a
1 changed files with 8 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue