Shouldn’t here be a once = false; ?
once = false;
since a window class only should be initialized once…