[openbox] "Enter" key in menu

Alexey Korop akorop at gmail.com
Mon Nov 8 10:11:56 EST 2010


Hi, All

    In the 3.5 rc, after the submenu show delay for the keyboard 
navigation was improved, the behavior of the "Enter" key was very 
strange: "Enter" does nothing while submenu is not expanded.
    IMHO this is a bug, and the correct behavior of the "Enter" key must 
be the same as of the "Right" key, i.e. to expand and select the submenu.
     Correction if very simple

--- /mnt/i/linux/dana/openbox.git/openbox/event.c 2010-11-04 
16:12:42.000000000 +0200
+++ ./openbox/event.c   2010-11-08 12:49:50.000000000 +0200
@@ -1892,6 +1897,9 @@
              }

              else if (sym == XK_Return || sym == XK_KP_Enter) {
+                if (frame->selected &&
+                    frame->selected->entry->type == 
OB_MENU_ENTRY_TYPE_SUBMENU)
+                   menu_frame_select(frame, frame->selected, TRUE);
                  frame->press_doexec = TRUE;
                  ret = TRUE;
              }

This patch based on the "work" branch.

Yours truly Alexey


More information about the openbox mailing list