macOS: fullscreen Chrome Focus capture includes unselected toolbar, clips bottom, and offsets cursor
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- macos, rust
研究方向
Start with crates/recording/src/sources/screen_capture/macos.rs and compare the ScreenCaptureKit source rectangle with the picker bounds from apps/desktop-gpui/src/target_overlay.rs; then check cursor cropping in crates/recording/src/cursor.rs. Reproduce the reported fullscreen Chrome case and inspect the captured frame geometry alongside cursor coordinates. Done means the recording matches the selected bounds, including the bottom edge, and the cursor stays aligned.
由索引模型根據 Issue 內容生成。
描述
Description
Focus window recording of Chrome in its fullscreen/maximized state does not match the blue capture-selection rectangle on macOS. The picker selects the page content below Chrome's tabs/address toolbar, but the resulting recording includes that toolbar and loses a corresponding portion of the bottom of the selected content. The recorded cursor also has a persistent upward offset, even after the mouse stops moving.
This is consistently reproducible in manual testing. A normal, non-maximized Chrome window records accurately whether Cap's setup window is on the same display or a different display. This suggests that placing the setup window on another monitor alone is not sufficient to trigger the problem.
Reproduction
- Use Chrome on a Mac with multiple displays.
- Put Chrome into the fullscreen/maximized state in which Cap's setup controls cannot remain visible alongside it on the same display, and place Cap's setup window on another display.
- Select the Chrome window for Studio recording with Focus enabled. Center on screen was also enabled in the reported example; its independent effect has not been isolated.
- Observe the blue selection rectangle: it excludes the browser's tabs/address toolbar and covers the page-content area. One example shows 1920 × 992 selected within a 1920 × 1080 screen image, excluding approximately 88 pixels at the top.
- Record the window, moving the pointer to recognizable controls and letting it stop.
- Compare the actual recording with the blue selection rectangle and the controls the pointer was over.
- Repeat with Chrome as a normal, non-maximized window as a control case.
The fullscreen/maximized description above identifies the observed window state; other macOS zoom/fill variants have not been separately isolated.
Expected behavior
The recorded frame should match the selected blue bounds, preserve their bottom edge, and keep the cursor aligned with the actual UI targets.
Actual behavior
- Browser chrome above the selected bounds appears in the recording.
- Content near the bottom of the selected bounds is cut off.
- The cursor is consistently displaced upward relative to the recorded UI, including while stationary.
- The normal-window control case records correctly with either same-display or cross-display setup controls.
This is a capture-area mismatch as well as a cursor-placement issue; shifting cursor metadata alone cannot recover the omitted bottom content.
Additional Context
- Cap: 0.6.3
- macOS: 27.2.1
- Google Chrome: 157.0.8103.79
- Device: Apple Silicon MacBook with multiple displays
- Mode: Studio, window capture, Focus enabled
The original screenshots contain internal work documents/account information and are not attached here.
Source investigation — suspected cause, not a verified fix
The following code paths appear relevant:
- The picker's window bounds come from
display_relative_logical_bounds(), ultimately based onkCGWindowBounds. - Focus capture creates a ScreenCaptureKit
desktopIndependentWindowfilter. Its source rectangle uses a local(8, 8)origin and dimensions derived from the CG window bounds. - The cursor crop continues to use the current CG window origin.
- Chromium's native fullscreen implementation moves the top toolbar out of the main content view into an AppKit fullscreen window.
A possible explanation is that the CG-selected content rectangle and the actual SCK window surface have different origins/extents in this fullscreen case. Treating them as equivalent would explain all three symptoms: extra toolbar, missing bottom content, and a uniform cursor offset. The actual SCK frame geometry for the failing fullscreen recording has not been captured, so the precise SCK composition/cropping behavior is still a hypothesis.
Related: #4254 removes the 8-point corner trim. I also inspected main at abba000, where the independent-window source origin is (0, 0). I have not verified a nightly build or established that this related change resolves the fullscreen toolbar-height discrepancy.
Could the selected bounds, actual window-surface crop, and cursor mapping be checked together for this fullscreen Chrome case?
- 主要語言
- Rust
- 星號
- 25k
- 分支
- 2.4k
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 690
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CapSoftware/Cap 的其他 Issue
-
Captions panel does not offer to show an existing transcript可能已有人在做 @thedavidweng 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
CapSoftware/Cap#4276 · 1 則留言 ·
維護者通常 1 天內回覆
-
Download, FAQ, privacy and terms pages have no meta description可能已有人在做 @patrickballard 於 14 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
CapSoftware/Cap#3675 · 1 則留言 ·
維護者通常 1 天內回覆
-
self hosting
難度 2/5 1-3 小時 新手友好度 68/100
CapSoftware/Cap#2384 · 3 則留言 ·
維護者通常 1 天內回覆
-
Dashboard pagination causes full page reloads on self-hosted Cap可能已有人在做 @DipanshuAmbilkar03 於 13 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
CapSoftware/Cap#2305 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
CapSoftware/Cap#1714 · 3 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
community differential help wanted
難度 2/5 1-3 小時 新手友好度 68/100
hffgzktbcc-blip/ounce-core#489 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 68/100
pact-foundation/pact-plugins#125 ·
-
good first issue help wanted
難度 1/5 1 小時以內 新手友好度 87/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
facebookexperimental/hermit#347 ·
維護者通常 1 天內回覆