diff --git a/Sources/Kapture/CaptureController.swift b/Sources/Kapture/CaptureController.swift index a39ef1c..a12fffd 100644 --- a/Sources/Kapture/CaptureController.swift +++ b/Sources/Kapture/CaptureController.swift @@ -180,12 +180,12 @@ final class ScreenCapture { config.height = Int(CGFloat(display.height) * backingScale) config.showsCursor = true - // ScreenCaptureKit's Y axis is flipped relative to AppKit - // NSScreen frames. Convert the selection into SCDisplay space - // using the matching NSScreen's top edge, then crop there. + // ScreenCaptureKit uses a different origin than AppKit for + // screens stacked around the main display: per-display, + // SCDisplay y = appKitY - NSScreen.maxY + SCDisplay.maxY. let scRect = CGRect( x: rect.minX, - y: screen.frame.maxY - rect.maxY + display.frame.minY, + y: rect.minY - screen.frame.maxY + display.frame.maxY, width: rect.width, height: rect.height ) diff --git a/build-app.sh b/build-app.sh index 984c3b2..ba1a3fb 100755 --- a/build-app.sh +++ b/build-app.sh @@ -108,9 +108,9 @@ cat > "$APP/Contents/Info.plist" <<'PLIST' CFBundleIconFile Icon CFBundleShortVersionString - 1.1.7 + 1.1.8 CFBundleVersion - 17 + 18 LSUIElement NSHighResolutionCapable