mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
fix mac build
This commit is contained in:
parent
4de657fc3e
commit
a176ffeee1
1 changed files with 5 additions and 5 deletions
|
|
@ -299,10 +299,10 @@ final class WindowTracker {
|
||||||
logger.warning("Could not find matching window in AXUIElement list")
|
logger.warning("Could not find matching window in AXUIElement list")
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Permissions
|
// MARK: - Direct Permission Checks
|
||||||
|
|
||||||
/// Checks if we have the required permissions for window tracking.
|
/// Checks if we have the required permissions for window tracking using direct API calls.
|
||||||
private func checkPermissions() -> Bool {
|
private func checkPermissionsDirectly() -> Bool {
|
||||||
// Check for Screen Recording permission (required for CGWindowListCopyWindowInfo)
|
// Check for Screen Recording permission (required for CGWindowListCopyWindowInfo)
|
||||||
let options: CGWindowListOption = [.excludeDesktopElements]
|
let options: CGWindowListOption = [.excludeDesktopElements]
|
||||||
if let windowList = CGWindowListCopyWindowInfo(options, kCGNullWindowID) as? [[String: Any]],
|
if let windowList = CGWindowListCopyWindowInfo(options, kCGNullWindowID) as? [[String: Any]],
|
||||||
|
|
@ -312,8 +312,8 @@ final class WindowTracker {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Requests the required permissions.
|
/// Requests the required permissions by opening System Preferences.
|
||||||
private func requestPermissions() {
|
private func requestPermissionsDirectly() {
|
||||||
logger.info("Requesting Screen Recording permission")
|
logger.info("Requesting Screen Recording permission")
|
||||||
|
|
||||||
// Open System Preferences to Privacy & Security > Screen Recording
|
// Open System Preferences to Privacy & Security > Screen Recording
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue