Description
When I start an area screenshot, the selection overlay opens with my previous selection already drawn. Most of the time I want a new area, so I have to drag over or reset the old box first.
Reproduction
- Start an area screenshot and drag a region. Capture it.
- Start another area screenshot.
- The previous region is still drawn when the overlay appears.
Expected
Each area screenshot starts with an empty selection, unless I've explicitly asked Cap to remember the area.
Possible cause
Screenshot mode already looks like it's meant to start fresh. In target-select-overlay.tsx, effectiveInitialAreaBounds returns undefined when options.mode === "screenshot", and the padlock "lock selection" is limited to recording mode.
On macOS, though, close_target_select_overlay_windows hides the overlay window instead of closing it (it only calls close() on Windows). The next ShowCapWindow::TargetSelectOverlay finds the existing window and re-reveals it through request_overlay_reveal without reloading the webview, so the Cropper keeps its last bounds.
Suggestion
- Reset the crop when the overlay is revealed for a new screenshot session.
- If remembering the area is useful for screenshots too, make it opt-in by extending the padlock to screenshot mode: locked reuses the area, unlocked always starts fresh.
I'm happy to open a PR for this if a maintainer confirms which direction you'd prefer.
Environment
- Cap 0.6.0
- macOS 27.0.1, Apple M1 Pro
- 3 displays
Description
When I start an area screenshot, the selection overlay opens with my previous selection already drawn. Most of the time I want a new area, so I have to drag over or reset the old box first.
Reproduction
Expected
Each area screenshot starts with an empty selection, unless I've explicitly asked Cap to remember the area.
Possible cause
Screenshot mode already looks like it's meant to start fresh. In
target-select-overlay.tsx,effectiveInitialAreaBoundsreturnsundefinedwhenoptions.mode === "screenshot", and the padlock "lock selection" is limited to recording mode.On macOS, though,
close_target_select_overlay_windowshides the overlay window instead of closing it (it only callsclose()on Windows). The nextShowCapWindow::TargetSelectOverlayfinds the existing window and re-reveals it throughrequest_overlay_revealwithout reloading the webview, so the Cropper keeps its last bounds.Suggestion
I'm happy to open a PR for this if a maintainer confirms which direction you'd prefer.
Environment