X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=ba156da6fc35952fc6b2cedc0d30b01cc5addaa7;hb=5fdb5cb7ddc18c1c00fa79472d2e199ab8570a06;hp=ba39ef9f562d9844ec8eae01885f17c2239341c9;hpb=2e82715a4a53fbab6d359c76aa58581c4087ddaf;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index ba39ef9f..ba156da6 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -700,6 +700,8 @@ static void event_process(const XEvent *ec, gpointer data) static guint pressed = 0; static Window pressed_win = None; + event_sourcetime = event_curtime; + /* If the button press was on some non-root window, or was physically on the root window... */ if (window != obt_root(ob_screen) || @@ -726,6 +728,8 @@ static void event_process(const XEvent *ec, gpointer data) else if (e->type == KeyPress || e->type == KeyRelease || e->type == MotionNotify) { + event_sourcetime = event_curtime; + used = event_handle_user_input(client, e); if (prompt && !used) @@ -1945,8 +1949,15 @@ static gboolean event_handle_menu_input(XEvent *ev) if (found) { menu_frame_select(frame, found, TRUE); - if (num_found == 1) - frame->press_doexec = TRUE; + if (num_found == 1) { + if (found->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) { + /* move focus to the child menu */ + menu_frame_select_next(frame->child); + } + else { + frame->press_doexec = TRUE; + } + } ret = TRUE; } }