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.

Thanks,
Tom



23. 11. 2026 21:24 od [email protected]:

> On Mon 2026.11.23 at 21:16 +0100, Tomas Rippl wrote:
>
>> Hi Okan,
>>
>> Thanks for looking into this. Reading the patch, it looks like a window 
>> without WM_CLASS could still be selected when cycling among windows of a 
>> known class. For example, the editor could be selected while cycling among 
>> xterms. Should window-cycle-inclass skip candidates whose class is missing?
>>
>
> Yes, that's what I was thinking while writing "[..] probably not the best 
> [..]" - what-do when
> there is no class and/or name.
>
> When using cycle-in-class, where you expecting that window, or rather 
> multiples of that client, to be
> available for cycling? Or were you just using cycle-in-class as an alias for 
> plain cycling?
>
> Where I'm going is if empty class/name clients should be able to cycle within 
> their own "dummy" class; though
> there's an interaction with groups which might get in the way...
>
>> Thanks,
>> Tom
>>
>> 23. 11. 2026 20:23 od [email protected]:
>>
>> > On Mon 2026.11.23 at 17:08 +0100, Tomas Rippl wrote:
>> >
>> >>
>> >> Hi Omar,
>> >>
>> >> I narrowed the crash down to window cycling involving the jmigpin editor. 
>> >> I checked both windows with xprop. The editor???s main window (0start - 
>> >> Editor) is in Normal state and has no WM_CLASS property. The xterm window 
>> >> reports WM_CLASS(STRING) = "xterm", "XTerm".
>> >>
>> >> This seems consistent with the NULL read in strcmp() and the unchecked 
>> >> res_class comparison in kbfunc_client_cycle(). I haven???t confirmed that 
>> >> call site with a symbolized backtrace yet.
>> >>
>> >> I???m also filing an issue with jmigpin-editor about the missing WM_CLASS 
>> >> property.
>> >> Thanks,
>> >> Tom
>> >>
>> >
>> > I can see that as a problem - not tested, and probably not the best place 
>> > for it.
>> >
>> > 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       23 Nov 2026 19:20:01 -0000
>> > @@ -439,6 +439,7 @@ kbfunc_client_cycle(void *ctx, struct ca
>> >  ((flags & CWM_CYCLE_INGROUP) &&
>> >  (newcc->gc != oldcc->gc)) ||
>> >  ((flags & CWM_CYCLE_INCLASS) &&
>> > +              newcc->res_class && oldcc->res_class &&
>> >  strcmp(newcc->res_class, oldcc->res_class) != 0))
>> >  again = 1;
>> >
>>

Reply via email to