Hi Okan,


I built cwm with your revised patch and tested it on OpenBSD 8.0/amd64 in 
Xephyr, using two xterms and the original jmigpin-editor binary whose window 
lacks WM_CLASS.

Same-class cycling from an xterm switched between the two xterms and skipped 
the editor.
Same-class cycling from the editor left focus on the editor. cwm stayed 
running, and keyboard input worked after I released the modifier.
Plain window cycling still included the editor.

I used Ctrl+F8 and Ctrl+F9 in Xephyr to test the two cycling actions directly.



Thanks for the patch,
Tom





24. 11. 2026 17:42 od [email protected]:

> 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