Skip to content

Open source CapCut alternative.

TypeScript

fix(app): open Settings when screen-recording request no-ops

David Le07dd57b42660
diff --git a/apps/Donkey/Sources/Donkey/MacPermissionSetupWindowController.swift b/apps/Donkey/Sources/Donkey/MacPermissionSetupWindowController.swift
index f9b72848..43502dc2 100644
--- a/apps/Donkey/Sources/Donkey/MacPermissionSetupWindowController.swift
+++ b/apps/Donkey/Sources/Donkey/MacPermissionSetupWindowController.swift
@@ -98,6 +98,15 @@ final class MacPermissionSetupModel: ObservableObject {
statuses[kind] = status
refresh()
requestingKind = nil
+
+ // CGRequestScreenCaptureAccess() silently no-ops when a stale TCC record already
+ // exists — common after rebuilding the ad-hoc-signed dev app — so no system prompt
+ // appears and the app never lands in the Screen Recording list. When the request
+ // leaves us short of a grant, open the settings pane so there is always a visible,
+ // reliable path to flip the toggle.
+ if kind == .screenRecording, statuses[kind] != .granted {
+ requester.openSystemSettings(for: kind)
+ }
}
func openSystemSettings(for kind: MacPermissionKind) {