Move window attributes detection into create().

It's going to be called anyway.

Also move the DEBUG check to the macro definition; stdlog() should log
no matter what.