Capture and store window coordinates