Also this thing (no matter of the -O flag):
auto a=FOCUS_LOST|SINKING;
if(p.cmd==a) {...}
works, but not this:
if(p.cmd==FOCUS_LOST|SINKING) {...}

Purely out of interest, could you try this:

if (p.cmd == (FOCUS_LOST|SINKING))

--downs

"if (p.cmd == (FOCUS_LOST|SINKING))" works.

And it's meant to, and the other isn't, because the precedence of == is higher
than the precedence of |.
IMHO it's stupid legacy, dating back to B (yes, B!), but what can you do.
--
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi