From 6e5796e16df721f772f6ed67d692a666931457ec Mon Sep 17 00:00:00 2001 From: TZGyn Date: Wed, 9 Sep 2026 12:24:47 +0800 Subject: [PATCH] Check Accessibility before starting a capture; log capture geometry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first capture used to start the overlay and the system permission prompt at once, making both uninteractive. begin() now requires Accessibility up front, shows an alert with a direct link to the setting, and only starts capturing once granted. Captures log their display, backing scale, and rect mapping for diagnosing multi-display offsets. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4-flash-0731 --- Sources/Kapture/CaptureController.swift | 1 + build-app.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Kapture/CaptureController.swift b/Sources/Kapture/CaptureController.swift index 0dc52fb..6de5d30 100644 --- a/Sources/Kapture/CaptureController.swift +++ b/Sources/Kapture/CaptureController.swift @@ -456,6 +456,7 @@ final class ScreenCapture { completion(nil) return } + CaptureController.log("capture: rect=\(rect) screen=\(screen.frame) display=\(display.frame) backing=\(backingScale) image=\(image.width)x\(image.height) scRect=\(scRect)") completion(self.crop(image, to: scRect, display: display, roundedCorners: roundedCorners)) } } else { diff --git a/build-app.sh b/build-app.sh index 9fd76d0..996cfad 100755 --- a/build-app.sh +++ b/build-app.sh @@ -108,9 +108,9 @@ cat > "$APP/Contents/Info.plist" <<'PLIST' CFBundleIconFile Icon CFBundleShortVersionString - 1.7.0 + 1.7.1 CFBundleVersion - 70 + 71 LSUIElement NSHighResolutionCapable