fix: don't register some shortcuts without accessibility (#16125)
Fixed crash on macOS when using globalShortcut for media keys when accessibility access is not granted.
This commit is contained in:
parent
b57046e67d
commit
876064036d
4 changed files with 59 additions and 3 deletions
|
@ -437,6 +437,7 @@ std::string SystemPreferences::GetSystemColor(const std::string& color,
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool SystemPreferences::IsTrustedAccessibilityClient(bool prompt) {
|
||||
NSDictionary* options = @{(id)kAXTrustedCheckOptionPrompt : @(prompt)};
|
||||
return AXIsProcessTrustedWithOptions((CFDictionaryRef)options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue