Area screenshot reopens with the previous selection instead of a fresh one (macOS)
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 63/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react, rust, tauri, typescript
调研方向
Start in target-select-overlay.tsx and trace how effectiveInitialAreaBounds and the cropper selection state are handled when an overlay is revealed. Then inspect the macOS close_target_select_overlay_windows and request_overlay_reveal paths to understand why the webview keeps its prior bounds. Done means a second screenshot starts with an empty selection unless remembering the area is explicitly enabled; the issue asks maintainers to choose between two approaches.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Rust
- 星标
- 23k
- 派生
- 2k
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 78
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CapSoftware/Cap 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
CapSoftware/Cap#2384 · 1 条评论 ·
维护者通常 2 天内回复
-
Dashboard pagination causes full page reloads on self-hosted Cap可能已有人在做 @Dewin 于 22 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
CapSoftware/Cap#2305 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
CapSoftware/Cap#1714 · 3 条评论 ·
维护者通常 2 天内回复
-
[Feature Request]: Add random string placeholder to default project name templates可能已有人在做 @mynameistito 于 3 天前认领。 未关闭
难度 1/5 1-3 小时 新手友好度 25/100
CapSoftware/Cap#2430 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug][Linux/Wayland] Window capture distorts aspect ratio, drops cursor/clicks, and cannot import .cap bundles via portal可能已有人在做 @EtherealBless 于 4 天前认领。 未关闭bug
难度 5/5 一周以上 新手友好度 25/100
CapSoftware/Cap#2419 · 1 条评论 ·
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
rescript-lang/rescript#8765 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
chroma-core/chroma#7879 ·
维护者通常 1 天内回复
-
priority middle
难度 1/5 1 小时以内 新手友好度 72/100
KATO-Hiro/AtCoderClans#12838 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复