]> Dogcows Code - chaz/openbox/commitdiff
dont keyboard nav onto disabled menu items
authorDana Jansens <danakj@orodu.net>
Fri, 29 Aug 2003 08:51:05 +0000 (08:51 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 29 Aug 2003 08:51:05 +0000 (08:51 +0000)
openbox/menuframe.c

index 0b90df6e959808b455fbbe9dcf9a4dc46dfed5f0..811d4c0572e8c420858a89d527b6b42bad6d2469 100644 (file)
@@ -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;
             }
         }
This page took 0.023942 seconds and 4 git commands to generate.