[openbox] "Enter" key in menu
Alexey Korop
akorop at gmail.com
Mon Nov 8 15:11:17 EST 2010
Dana Jansens wrote:
> Thanks Alexey. I've commited a change to fix the Enter behaviour.
Sorry, but Your patch introduced a new bug. Now after selection a
submenu by keyboard accelerator, a child menu is expanded but not activated.
I would like You to apply my patch as is instead of Your last
correction. It is working properly, and besides, there is another reason
not to combine the processing "Right" and "Enter". I have already
prepared a patch which adds long awaiting submenu with default choice,
with different works of this keys ("Enter" execute a default item,
"Right" expand a submenu). I held this big patch because I wanted to
first resolve the small issue with Enter, which affects the same part of
the program text.
> On Mon, Nov 8, 2010 at 10:11 AM, Alexey Korop <akorop at gmail.com
> <mailto:akorop at gmail.com>> wrote:
> 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.
More information about the openbox
mailing list