Improve window recreation logic in OpenGL* renderers