Window capture is one click on one app window. The rest of the desktop stays out of the picture. Use it when the thing you need is the window itself, not a region you draw and not the whole screen.
Click the window
- Open the window you want in front of the others if several overlap.
- Choose Window from the Shoverlay menu or the All-In-One picker.
- Click that window. Shoverlay takes a clean shot of it.
A clean window background is a separate choice, in the clean-shot settings. This mode already limits the picture to the window you clicked.
If the wrong window is in the shot
Click again after the window you want is the one under the pointer. Screen Recording must be on. Quit Shoverlay and reopen it after you grant that permission.
Install Shoverlay on the Mac App Store.
Related: Capture a rectangle instead · Hide desktop icons · Capture the full display