save and restore window state (pos/geom)