Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions OverflowBar/Services/PermissionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ final class PermissionManager: ObservableObject {
}

func requestScreenRecording() {
// Permission state can be stale when a local build replaces the
// release identity. Calling CGRequestScreenCaptureAccess repeatedly
// in that state reopens the macOS authorization sheet even when
// System Settings still shows OverflowBar as allowed. A permission
// button must only open the settings pane; capture itself remains
// gated by the read-only preflight check in MenuBarCaptureService.
refresh()
guard !screenRecordingGranted else { return }
openScreenRecordingSettings()
// Ask TCC first so supported app identities get the native prompt.
// Ad-hoc/background builds may not be promptable on macOS 26; in that
// case, open the exact pane so the user can add or enable this build.
_ = CGRequestScreenCaptureAccess()
refresh()
if !screenRecordingGranted { openScreenRecordingSettings() }
}

func openAccessibilitySettings() { open("x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility") }
Expand Down
Loading