Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83b127cf44 | ||
|
|
8332661504 | ||
|
|
832a18b06c | ||
|
|
6e5796e16d |
@@ -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
|
||||||
@@ -265,11 +260,12 @@ final class CaptureController: NSObject {
|
|||||||
guard isSelecting else { return event }
|
guard isSelecting else { return event }
|
||||||
|
|
||||||
switch type {
|
switch type {
|
||||||
case .tapDisabledByUserInput:
|
case .tapDisabledByUserInput, .tapDisabledByTimeout:
|
||||||
CGEvent.tapEnable(tap: eventTap!, enable: true)
|
// A timed-out tap must be re-enabled; guard against a torn-down tap.
|
||||||
return event
|
if let tap = eventTap {
|
||||||
case .tapDisabledByTimeout:
|
CGEvent.tapEnable(tap: tap, enable: true)
|
||||||
CGEvent.tapEnable(tap: eventTap!, enable: true)
|
CaptureController.log("tap: re-enabled after \(type)")
|
||||||
|
}
|
||||||
return event
|
return event
|
||||||
case .keyDown:
|
case .keyDown:
|
||||||
if event.getIntegerValueField(.keyboardEventKeycode) == 53 {
|
if event.getIntegerValueField(.keyboardEventKeycode) == 53 {
|
||||||
@@ -342,6 +338,7 @@ final class CaptureController: NSObject {
|
|||||||
ResultWindow.shared.show(image: ResultWindow.failureImage("Capture failed. Check Screen Recording permission."))
|
ResultWindow.shared.show(image: ResultWindow.failureImage("Capture failed. Check Screen Recording permission."))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
CaptureController.log("capture done: \(image.width)x\(image.height) — showing result window")
|
||||||
ResultWindow.shared.show(image: image)
|
ResultWindow.shared.show(image: image)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -440,7 +437,7 @@ final class ScreenCapture {
|
|||||||
let backingScale = screen.backingScaleFactor
|
let backingScale = screen.backingScaleFactor
|
||||||
config.width = Int(CGFloat(display.width) * backingScale)
|
config.width = Int(CGFloat(display.width) * backingScale)
|
||||||
config.height = Int(CGFloat(display.height) * backingScale)
|
config.height = Int(CGFloat(display.height) * backingScale)
|
||||||
config.showsCursor = true
|
config.showsCursor = false
|
||||||
|
|
||||||
// ScreenCaptureKit uses a different origin than AppKit for
|
// ScreenCaptureKit uses a different origin than AppKit for
|
||||||
// screens stacked around the main display: per-display,
|
// screens stacked around the main display: per-display,
|
||||||
@@ -456,6 +453,7 @@ final class ScreenCapture {
|
|||||||
completion(nil)
|
completion(nil)
|
||||||
return
|
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))
|
completion(self.crop(image, to: scRect, display: display, roundedCorners: roundedCorners))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+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.0</string>
|
<string>1.7.4</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>70</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