mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-03 10:55:54 +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")
|
||||
}
|
||||
|
||||
// MARK: - Permissions
|
||||
// MARK: - Direct Permission Checks
|
||||
|
||||
/// Checks if we have the required permissions for window tracking.
|
||||
private func checkPermissions() -> Bool {
|
||||
/// Checks if we have the required permissions for window tracking using direct API calls.
|
||||
private func checkPermissionsDirectly() -> Bool {
|
||||
// Check for Screen Recording permission (required for CGWindowListCopyWindowInfo)
|
||||
let options: CGWindowListOption = [.excludeDesktopElements]
|
||||
if let windowList = CGWindowListCopyWindowInfo(options, kCGNullWindowID) as? [[String: Any]],
|
||||
|
|
@ -312,8 +312,8 @@ final class WindowTracker {
|
|||
return false
|
||||
}
|
||||
|
||||
/// Requests the required permissions.
|
||||
private func requestPermissions() {
|
||||
/// Requests the required permissions by opening System Preferences.
|
||||
private func requestPermissionsDirectly() {
|
||||
logger.info("Requesting Screen Recording permission")
|
||||
|
||||
// Open System Preferences to Privacy & Security > Screen Recording
|
||||
|
|
|
|||
Loading…
Reference in a new issue