SIGN IN SIGN UP

Fix click positions in window recordings

ScreenCaptureKit delivers rectangle frame attachments as the CFDictionary
form of a CGRect, but rectValue only accepted a boxed CGRect or NSValue.
screenRect and contentRect therefore decoded as nil on every frame, so
frameGeometries stayed empty and per-frame window tracking silently never
ran. Every window recording fell back to the static capture rect, which is
why moving or resizing the window during a take made the drift far worse.

The fallback itself was also wrong. SCWindow.frame is already in Quartz's
top-left global space, but normalizedPoint flipped it as if it were AppKit
bottom-left. On a 1728x1117 display that double flip is exactly the
menu-bar-height offset; for a resized window the error scales with its
distance from the bottom of the screen.

Capture rects are now Quartz top-left for all three sources, converted once
at construction rather than at normalization, so pointer events, capture
geometry, and the video surface share a single origin and no axis is
flipped twice.

Verified against live ScreenCaptureKit output: screenRect matches
SCWindow.frame in CGDisplayBounds space, and on resize the content is
pinned to the surface's top-left with contentScale shrinking to fit, which
the screenRect -> contentRect -> surface mapping already handles.

Existing recordings keep the coordinates already written to input.json.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JKumBzipQQn9vrJ4XDiiB
F
Fayaz Ahmed committed
e585af2fddda57d1ad2d32a90f3960e10b286909
Parent: 63ccf56