diff options
author | okan <okan> | 2017-04-24 12:27:32 +0000 |
---|---|---|
committer | okan <okan> | 2017-04-24 12:27:32 +0000 |
commit | 9b5632590822eea5d11d0994fd7a6e1a5feffb7a (patch) | |
tree | 5c4925cfcf83c48c08a25ec35d9b47ae838ba3f7 | |
parent | 50dd70afc5f37b724ce0f68dd6755faffbb994df (diff) | |
download | cwm-9b5632590822eea5d11d0994fd7a6e1a5feffb7a.tar.gz cwm-9b5632590822eea5d11d0994fd7a6e1a5feffb7a.tar.xz cwm-9b5632590822eea5d11d0994fd7a6e1a5feffb7a.zip |
Raise the previously focused window, instead of the previous window in the
cycle list; seems to match behaviour of other wm's; from Walter Alejandro Iglesias.
-rw-r--r-- | client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client.c b/client.c index bf9a823..c5c7959 100644 --- a/client.c +++ b/client.c @@ -645,7 +645,7 @@ match: void client_cycle(struct screen_ctx *sc, int flags) { - struct client_ctx *newcc, *oldcc; + struct client_ctx *newcc, *oldcc, *prevcc; int again = 1; /* For X apps that ignore events. */ @@ -655,6 +655,7 @@ client_cycle(struct screen_ctx *sc, int flags) if (TAILQ_EMPTY(&sc->clientq)) return; + prevcc = TAILQ_FIRST(&sc->clientq); oldcc = client_current(); if (oldcc == NULL) oldcc = (flags & CWM_CYCLE_REVERSE) ? @@ -686,6 +687,7 @@ client_cycle(struct screen_ctx *sc, int flags) /* reset when cycling mod is released. XXX I hate this hack */ sc->cycling = 1; client_ptrsave(oldcc); + client_raise(prevcc); client_raise(newcc); if (!client_inbound(newcc, newcc->ptr.x, newcc->ptr.y)) { newcc->ptr.x = newcc->geom.w / 2; |