[openbox] Menu where nothing is selected

Alexey Korop akorop at gmail.com
Thu Sep 15 03:44:52 EDT 2011


Hi, All

     (This letter is a copy of the bug 5235 
https://bugzilla.icculus.org/show_bug.cgi?id=5235)

     If the openbox menu called using the keyboard, and the first item 
of this menu is the normal item, then the first item is selected. 
However, if the first item - submenu, then no item will be selected. 
This strange behavior is by design (openbox/menu.c:473):

          if (!mouse) {
              /* select the first entry if it's not a submenu and we opened
               * the menu with the keyboard, and skip all headers */
              GList *it = frame->entries;
              while (it) {
                  ObMenuEntryFrame *e = it->data;
                  if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) {
                      menu_frame_select(frame, e, FALSE);
                      break;
                  } else if (e->entry->type == OB_MENU_ENTRY_TYPE_SEPARATOR)
                      it = g_list_next(it);
                  else
                      break;
              }


     This behavior is strange and inconvenient. I see no reason to 
submenu has not been chosen. Perhaps this vestige left over from the 
time when autoopening delay a submenu not applied when using the keyboard.

     I propose to replace this strange and complex piece of very simple:

             if (!mouse)
                menu_frame_select_next(frame);


Yours truly Alexey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kbd_menu.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20110915/2bbf6815/attachment.bin>


More information about the openbox mailing list