To me ! is logical NOT and your suggestion relies on the fact that XUrgencyHint is a single bit flag? no?
I prefer the original code, as it doesn't use side effects of logical NOTs. -Anselm On 27 October 2016 at 01:40, Markus Teich <[email protected]> wrote: > --- > dwm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dwm.c b/dwm.c > index 3d6cc28..85ec75e 100644 > --- a/dwm.c > +++ b/dwm.c > @@ -2020,7 +2020,7 @@ updatewmhints(Client *c) > wmh->flags &= ~XUrgencyHint; > XSetWMHints(dpy, c->win, wmh); > } else > - c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0; > + c->isurgent = !!(wmh->flags & XUrgencyHint); > if (wmh->flags & InputHint) > c->neverfocus = !wmh->input; > else > -- > 2.7.3 > >
