Change window creation so that POSITION is sent before STATE (as required by the protocol). Also remove unnecessary z order comment.