dont leave non-submenu items selected when the mouse isnt over them

This commit is contained in:
Dana Jansens 2003-09-15 08:29:50 +00:00
parent e1a618444e
commit 1767616825

View file

@ -1181,6 +1181,16 @@ static void event_handle_menu(XEvent *ev)
ev->xmotion.y_root))) ev->xmotion.y_root)))
menu_frame_select(f, e); menu_frame_select(f, e);
} }
{
ObMenuFrame *a;
a = find_active_menu();
if (a && a != f &&
a->selected->entry->type != OB_MENU_ENTRY_TYPE_SUBMENU)
{
menu_frame_select(a, NULL);
}
}
break; break;
case KeyPress: case KeyPress:
if (ev->xkey.keycode == ob_keycode(OB_KEY_ESCAPE)) if (ev->xkey.keycode == ob_keycode(OB_KEY_ESCAPE))