Raise previous window after cycling on cwm.
--- client.c.orig Mon Apr 10 14:24:11 2017
+++ client.c Mon Apr 10 14:29:14 2017
@@ -645,9 +645,11 @@ match:
void
client_cycle(struct screen_ctx *sc, int flags)
{
- struct client_ctx *newcc, *oldcc;
+ struct client_ctx *newcc, *oldcc, *prevcc;
int again = 1;
+ prevcc = TAILQ_FIRST(&sc->clientq);
+
/* For X apps that ignore events. */
XGrabKeyboard(X_Dpy, sc->rootwin, True,
GrabModeAsync, GrabModeAsync, CurrentTime);
@@ -686,6 +688,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;