summaryrefslogtreecommitdiff
path: root/openbox/event.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2009-12-14 18:18:10 -0500
committerDana Jansens <danakj@orodu.net>2009-12-14 18:18:10 -0500
commit828c095c8b5a2df96a38faaeb8a0df504e68e70f (patch)
tree72dca50aeee8b7b042387fb830c99daf5a4921b8 /openbox/event.c
parent111465b7373cdcdd791b603aefd882ae06d5bf0b (diff)
Don't hide submenus immediately when unselecting the parent's entry
This allows users to move to the submenu across other menu items (the same as they already could across other menu items that were submenus). This uses the same config delay for hiding submenus as it does for showing new ones. Based off the ideas in bug #3762.
Diffstat (limited to 'openbox/event.c')
-rw-r--r--openbox/event.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 881c9f8f..d5791a03 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -1841,7 +1841,12 @@ static gboolean event_handle_menu(XEvent *ev)
(f = find_active_menu()) && f->selected == e &&
e->entry->type != OB_MENU_ENTRY_TYPE_SUBMENU)
{
- menu_frame_select(e->frame, NULL, FALSE);
+ ObMenuEntryFrame *u = menu_entry_frame_under(ev->xcrossing.x_root,
+ ev->xcrossing.y_root);
+ /* if we're just going from one entry in the menu to the next,
+ don't unselect stuff first */
+ if (!u || e->frame != u->frame)
+ menu_frame_select(e->frame, NULL, FALSE);
}
break;
case MotionNotify: