From f8aab34e529c23b44f1a4949d143a4a2ea416512 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 28 May 2007 03:31:06 +0000 Subject: [PATCH] dont make motions in menus outside of the active menu, its child, and its parent, do anything --- openbox/event.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index 5590221f..1b387bdf 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1692,7 +1692,10 @@ static gboolean event_handle_menu(XEvent *ev) if ((e = g_hash_table_lookup(menu_frame_map, &ev->xcrossing.window))) { if (e->ignore_enters) --e->ignore_enters; - else + else if (!(f = find_active_menu()) || + f == e->frame || + f->parent == e->frame || + f->child == e->frame) menu_frame_select(e->frame, e, FALSE); } break; @@ -1711,7 +1714,11 @@ static gboolean event_handle_menu(XEvent *ev) case MotionNotify: if ((e = menu_entry_frame_under(ev->xmotion.x_root, ev->xmotion.y_root))) - menu_frame_select(e->frame, e, FALSE); + if (!(f = find_active_menu()) || + f == e->frame || + f->parent == e->frame || + f->child == e->frame) + menu_frame_select(e->frame, e, FALSE); break; case KeyPress: ret = event_handle_menu_keyboard(ev); -- 2.45.2