update window position and size