Cache mouse position for better resizing