we should re-focus the client and ungrab the ptr even if we don't have a
mouse based match (i.e. in the kbd no match case). update the comment as well. ok oga@
This commit is contained in:
parent
482c4ce498
commit
9a52c582b1
@ -171,13 +171,14 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
if (dummy == 0 && mi->dummy) { /* no match */
|
if (dummy == 0 && mi->dummy) { /* no mouse based match */
|
||||||
xfree (mi);
|
xfree(mi);
|
||||||
mi = NULL;
|
mi = NULL;
|
||||||
xu_ptr_ungrab();
|
|
||||||
XSetInputFocus(X_Dpy, focuswin, focusrevert, CurrentTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XSetInputFocus(X_Dpy, focuswin, focusrevert, CurrentTime);
|
||||||
|
xu_ptr_ungrab();
|
||||||
|
|
||||||
XUnmapWindow(X_Dpy, sc->menuwin);
|
XUnmapWindow(X_Dpy, sc->menuwin);
|
||||||
XUngrabKeyboard(X_Dpy, CurrentTime);
|
XUngrabKeyboard(X_Dpy, CurrentTime);
|
||||||
|
|
||||||
@ -390,7 +391,6 @@ menu_handle_release(XEvent *e, struct menu_ctx *mc, struct screen_ctx *sc,
|
|||||||
int entry, i = 0;
|
int entry, i = 0;
|
||||||
|
|
||||||
entry = menu_calc_entry(sc, mc, e->xbutton.x, e->xbutton.y);
|
entry = menu_calc_entry(sc, mc, e->xbutton.x, e->xbutton.y);
|
||||||
xu_ptr_ungrab();
|
|
||||||
|
|
||||||
if (mc->hasprompt)
|
if (mc->hasprompt)
|
||||||
i = 1;
|
i = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user