update config whenever there are changes to window