Make gWindow not global.