X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=9502edf51e43e806ab5794428992799b2d2b0d3c;hb=c8ef10a0e1d8b75a8ae6027383a5081a9a1b0ea0;hp=4fbb97c6d923f27fcb3e05791b29f8efab00649d;hpb=f6193ad9e048c5824142d3e7feeb109f91054052;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 4fbb97c6..9502edf5 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1369,7 +1369,7 @@ static void event_handle_client(ObClient *client, XEvent *e) ob_debug_type(OB_DEBUG_APP_BUGS, "_NET_ACTIVE_WINDOW message for window %s is " "missing source indication"); - client_activate(client, FALSE, TRUE, TRUE, + client_activate(client, TRUE, TRUE, TRUE, (e->xclient.data.l[0] == 0 || e->xclient.data.l[0] == 2)); } else if (msgtype == OBT_PROP_ATOM(NET_WM_MOVERESIZE)) { @@ -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;