Close menu properly on unbound keys.

This commit is contained in:
Scott Moynes 2003-07-29 01:04:22 +00:00
parent f6ad401dab
commit dd33644de4
2 changed files with 2 additions and 3 deletions

View file

@ -1093,7 +1093,7 @@ static void event_handle_menu(ObClient *client, XEvent *e)
/* will call the menu_hide() for each submenu as well */
if (!it)
menu_hide(menu_visible->data);
((ObMenu *)menu_visible->data)->hide(menu_visible->data);
break;
case MotionNotify:

View file

@ -581,8 +581,7 @@ void menu_control_keyboard_nav(unsigned int key)
break;
}
default:
if (current_menu)
current_menu->hide(current_menu);
((ObMenu *)menu_visible->data)->hide(menu_visible->data);
}
return;
}