On Mon 2026.11.23 at 21:41 +0100, Tomas Rippl wrote:
> Hi Okan,
> 
> I hit the shortcut by accident and didn???t have a use case for cycling 
> between windows without WM_CLASS. My intuition is that a missing class should 
> be treated as unknown. If the focused window has no class, I???d leave focus 
> where it is. If a candidate window has no class, I???d skip it and keep 
> looking for a match. That also avoids grouping unrelated applications just 
> because they both lack WM_CLASS.
> 

I still don't like it, but the intent should match expectation.

Index: kbfunc.c
===================================================================
RCS file: /home/open/cvs/xenocara/app/cwm/kbfunc.c,v
diff -u -p -r1.176 kbfunc.c
--- kbfunc.c    20 Aug 2025 23:44:06 -0000      1.176
+++ kbfunc.c    24 Nov 2026 16:35:28 -0000
@@ -437,9 +437,10 @@ kbfunc_client_cycle(void *ctx, struct ca
                /* Only cycle visible and non-ignored windows. */
                if ((newcc->flags & (CLIENT_SKIP_CYCLE)) ||
                    ((flags & CWM_CYCLE_INGROUP) &&
-                   (newcc->gc != oldcc->gc)) ||
+                    (newcc->gc != oldcc->gc)) ||
                    ((flags & CWM_CYCLE_INCLASS) &&
-                   strcmp(newcc->res_class, oldcc->res_class) != 0))
+                    ((!newcc->res_class || !oldcc->res_class) ||
+                     strcmp(newcc->res_class, oldcc->res_class)) != 0))
                        again = 1;
 
                /* Is oldcc the only non-hidden window? */

Reply via email to