added saving of size and place of window