]> Dogcows Code - chaz/openbox/commitdiff
Use submenuShowDelay when navigating menus with the keyboard
authorDana Jansens <danakj@orodu.net>
Fri, 8 Jan 2010 14:00:00 +0000 (09:00 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 8 Jan 2010 14:00:00 +0000 (09:00 -0500)
openbox/event.c
openbox/menuframe.c

index ad9dade6941aa254fe2c80f7e2facb77b916271b..58e947fa1385fb152622d2be38f71112dfc91f1e 100644 (file)
@@ -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;
         }
 
index 076fe6efc295ff231405ac4c4bb6a7ab6668476d..3d2b4302c67efbec266bbe35202dcb890218d255 100644 (file)
@@ -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);
 }
This page took 0.026448 seconds and 4 git commands to generate.