From 83b127cf44ebabd4ac5b3cc47d59987c66954eb7 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Wed, 9 Sep 2026 14:03:52 +0800 Subject: [PATCH] Detect maximized windows on secondary displays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A leftover heuristic skipped any window matching its screen's dimensions, which made window detection silently fail on secondary monitors where the working window is typically maximized. 💘 Generated with Crush Assisted-by: Crush:deepseek-v4-flash-0731 --- Sources/Kapture/CaptureController.swift | 5 ----- build-app.sh | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Sources/Kapture/CaptureController.swift b/Sources/Kapture/CaptureController.swift index f7f5534..5a889f6 100644 --- a/Sources/Kapture/CaptureController.swift +++ b/Sources/Kapture/CaptureController.swift @@ -233,11 +233,6 @@ final class CaptureController: NSObject { ) guard cgRect.width >= 80, cgRect.height >= 60 else { continue } let rect = Self.cgToAppKit(rect: cgRect) - // Skip windows filling an entire screen (fullscreen apps) - let coversWholeScreen = NSScreen.screens.contains { screen in - abs(screen.frame.width - rect.width) < 2 && abs(screen.frame.height - rect.height) < 2 - } - guard !coversWholeScreen else { continue } found.append((cid, rect)) } trackedWindows = found diff --git a/build-app.sh b/build-app.sh index a8cd724..3a38527 100755 --- a/build-app.sh +++ b/build-app.sh @@ -108,9 +108,9 @@ cat > "$APP/Contents/Info.plist" <<'PLIST' CFBundleIconFile Icon CFBundleShortVersionString - 1.7.3 + 1.7.4 CFBundleVersion - 73 + 74 LSUIElement NSHighResolutionCapable