Move the code to set the title on a window when a capture is in progress