if some part of the active foreground window is within the captured region, that is used.
if not, it tries to guess which window should be treated as the "active"/foreground window within the capture -- first by looking at cursor location, then at center of capture.
when it finds one, it uses that info for the caption and memo, but then also tries to find the largest contained subwindow to actively select -- which can be useful for performing blur effects, etc.