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 檢視

維護者通常 1 天內回覆

@AatmanAJ 已經在處理了。

開始於 2026年10月10日。

  • #2454 來自 @AatmanAJ —— 未關閉

評估

難度
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
星號
23.7k
分支
2.1k
平均合併
1 天 6 小時
30 天內合併 PR
705

環境準備

  • 提供 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 摘要。