Detect maximized windows on secondary displays
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
This commit is contained in:
@@ -233,11 +233,6 @@ final class CaptureController: NSObject {
|
|||||||
)
|
)
|
||||||
guard cgRect.width >= 80, cgRect.height >= 60 else { continue }
|
guard cgRect.width >= 80, cgRect.height >= 60 else { continue }
|
||||||
let rect = Self.cgToAppKit(rect: cgRect)
|
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))
|
found.append((cid, rect))
|
||||||
}
|
}
|
||||||
trackedWindows = found
|
trackedWindows = found
|
||||||
|
|||||||
+2
-2
@@ -108,9 +108,9 @@ cat > "$APP/Contents/Info.plist" <<'PLIST'
|
|||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>Icon</string>
|
<string>Icon</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.7.3</string>
|
<string>1.7.4</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>73</string>
|
<string>74</string>
|
||||||
<key>LSUIElement</key>
|
<key>LSUIElement</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user