The project is now saved when the window gets focus.