Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,432 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
63/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, rust, tauri, typescript
Ambito
desktop, frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Rust
Stelle
23k
Fork
2k
Merge medio
1g 18h
PR unite (30g)
78

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CapSoftware/Cap

Tutte le issue di CapSoftware/Cap

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.