diff options
author | okan | 2017-04-24 12:27:32 +0000 |
---|---|---|
committer | okan | 2017-04-24 12:27:32 +0000 |
commit | b9e07b6869264a0363549918a987394074cfb10b (patch) | |
tree | 5e0316039d3caffb164fba7ac25266e8a6c21fdf /client.c | |
parent | c64bea1dcfb38161bc6cd963a9bc0ea3c091b5d5 (diff) | |
download | cwm-b9e07b6869264a0363549918a987394074cfb10b.tar.gz |
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.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.235 2017/04/24 12:18:04 okan Exp $ + * $OpenBSD: client.c,v 1.236 2017/04/24 12:27:32 okan Exp $ */ #include <sys/types.h> @@ -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; |