save window geometry on exit, and restore it on startup