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?
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; >
