Allow setting window flags when the window is not realized