make escape close the whole menu
This commit is contained in:
parent
55886f27aa
commit
2d9260f8c4
1 changed files with 2 additions and 7 deletions
|
@ -1584,13 +1584,8 @@ static gboolean event_handle_menu_keyboard(XEvent *ev)
|
||||||
if (frame == NULL)
|
if (frame == NULL)
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
|
|
||||||
else if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0) {
|
else if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0)
|
||||||
/* Escape goes to the parent menu or closes the last one */
|
menu_frame_hide_all();
|
||||||
if (frame->parent)
|
|
||||||
menu_frame_select(frame, NULL, TRUE);
|
|
||||||
else
|
|
||||||
menu_frame_hide_all();
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (keycode == ob_keycode(OB_KEY_RETURN) && (state == 0 ||
|
else if (keycode == ob_keycode(OB_KEY_RETURN) && (state == 0 ||
|
||||||
state == ControlMask))
|
state == ControlMask))
|
||||||
|
|
Loading…
Reference in a new issue