X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=cedac2e3f29e28d758494f8bc197e3e7905239f4;hb=9f88642bf44ff2e500221ef140ccb9fc7c645b3d;hp=4fbb97c6d923f27fcb3e05791b29f8efab00649d;hpb=95ee6b103f116e34062bf5e1ad1cb8b0f23e7231;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 4fbb97c6..cedac2e3 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1701,7 +1701,7 @@ static gboolean event_handle_menu_input(XEvent *ev) { gboolean ret = FALSE; - if (ev->type == ButtonRelease) { + if (ev->type == ButtonRelease || ev->type == ButtonPress) { ObMenuEntryFrame *e; if (menu_hide_delay_reached() && @@ -1710,10 +1710,13 @@ static gboolean event_handle_menu_input(XEvent *ev) if ((e = menu_entry_frame_under(ev->xbutton.x_root, ev->xbutton.y_root))) { + if (ev->type == ButtonPress && e->frame->child) + menu_frame_select(e->frame->child, NULL, TRUE); menu_frame_select(e->frame, e, TRUE); - menu_entry_frame_execute(e, ev->xbutton.state); + if (ev->type == ButtonRelease) + menu_entry_frame_execute(e, ev->xbutton.state); } - else + else if (ev->type == ButtonRelease) menu_frame_hide_all(); } ret = TRUE;