mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Move client cycle grab/ungrab into a more relevant place; while here,
update comments about why we need to grab/ungrab the keyboard.
This commit is contained in:
parent
5391659629
commit
19826222f6
4
client.c
4
client.c
@ -659,6 +659,10 @@ client_cycle(struct screen_ctx *sc, int flags)
|
|||||||
struct client_ctx *newcc, *oldcc;
|
struct client_ctx *newcc, *oldcc;
|
||||||
int again = 1;
|
int again = 1;
|
||||||
|
|
||||||
|
/* For X apps that ignore events. */
|
||||||
|
XGrabKeyboard(X_Dpy, sc->rootwin, True,
|
||||||
|
GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
|
|
||||||
if (TAILQ_EMPTY(&sc->clientq))
|
if (TAILQ_EMPTY(&sc->clientq))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
10
kbfunc.c
10
kbfunc.c
@ -219,13 +219,7 @@ kbfunc_menu_group(struct client_ctx *cc, union arg *arg)
|
|||||||
void
|
void
|
||||||
kbfunc_client_cycle(struct client_ctx *cc, union arg *arg)
|
kbfunc_client_cycle(struct client_ctx *cc, union arg *arg)
|
||||||
{
|
{
|
||||||
struct screen_ctx *sc = cc->sc;
|
client_cycle(cc->sc, arg->i);
|
||||||
|
|
||||||
/* XXX for X apps that ignore events */
|
|
||||||
XGrabKeyboard(X_Dpy, sc->rootwin, True,
|
|
||||||
GrabModeAsync, GrabModeAsync, CurrentTime);
|
|
||||||
|
|
||||||
client_cycle(sc, arg->i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -464,7 +458,7 @@ void
|
|||||||
kbfunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
|
kbfunc_client_grouptoggle(struct client_ctx *cc, union arg *arg)
|
||||||
{
|
{
|
||||||
if (arg->i == 0) {
|
if (arg->i == 0) {
|
||||||
/* XXX for stupid X apps like xpdf and gvim */
|
/* For X apps that steal events. */
|
||||||
XGrabKeyboard(X_Dpy, cc->win, True,
|
XGrabKeyboard(X_Dpy, cc->win, True,
|
||||||
GrabModeAsync, GrabModeAsync, CurrentTime);
|
GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user