From: Dana Jansens Date: Mon, 15 Sep 2003 08:29:50 +0000 (+0000) Subject: dont leave non-submenu items selected when the mouse isnt over them X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;ds=inline;h=17676168255fcf5cbec9ea5dadcee546c5ab7bbb;p=chaz%2Fopenbox dont leave non-submenu items selected when the mouse isnt over them --- diff --git a/openbox/event.c b/openbox/event.c index f6d6f3b6..483050fa 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1181,6 +1181,16 @@ static void event_handle_menu(XEvent *ev) ev->xmotion.y_root))) 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; case KeyPress: if (ev->xkey.keycode == ob_keycode(OB_KEY_ESCAPE))