Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Area screenshot reopens with the previous selection instead of a fresh one (macOS)

未关闭
#2,432 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
63/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
react, rust, tauri, typescript
领域
desktop, frontend

调研方向

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
  1. Start an area screenshot and drag a region. Capture it.
  2. Start another area screenshot.
  3. 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CapSoftware/Cap 的其他 Issue

查看 CapSoftware/Cap 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。