Fix on-close handler so it can return any type, not only nil.
Disable opengl context sharing between windows.