Hi Tom,

> -     if (!XGetTextProperty(dpy, win, &prop, netwmname) || prop.nitems == 0)
> -             if (!XGetWMName(dpy, win, &prop) || prop.nitems == 0)
> +     if (!XGetTextProperty(dpy, win, &prop, netwmname) || !prop.nitems) {
> +             if (!XGetWMName(dpy, win, &prop) || !prop.nitems)
>                       return "";
> +     }

I disagree with “!prop.nitems” change.
Variable nitems isn't a boolean value,
it's a numeral counter,
so better testing explicitly against 0.

Rest of the changes are good though, thanks. :)

Reply via email to