Here's a diff that activates the previously active window, or the window
now under the cursor, when the current window is closed.  This makes sure
you don't necessarily have to move the mouse or cycle windows to make one
active.

Anyone for?

Thomas

Index: client.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/app/cwm/client.c,v
retrieving revision 1.2
retrieving revision 1.1.1.1.6.10
diff -u -p -r1.2 -r1.1.1.1.6.10
--- client.c    27 Jun 2009 08:20:23 -0000      1.2
+++ client.c    19 Aug 2009 16:08:14 -0000      1.1.1.1.6.10
@@ -170,6 +170,14 @@ client_delete(struct client_ctx *cc)
        client_freehints(cc);
        xfree(cc);
 
+       /* Activate previously active window or window now under cursor. */
+       if ((cc = TAILQ_FIRST(&sc->mruq)) != NULL) {
+               if ((cc->flags & (CLIENT_HIDDEN|CLIENT_IGNORE)) == 0) {
+                       client_ptrwarp(cc);
+                       client_setactive(cc, 1);
+               }
+       }
+
        return (0);
 }

Reply via email to