mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Remove 10.8 and older accessibility since it is no longer supported
This commit is contained in:
committed by
Mathew Sutcliffe
parent
3439edf946
commit
7cb95ef91f
@@ -74,28 +74,19 @@ namespace BlackInput
|
||||
|
||||
bool CKeyboardMac::init()
|
||||
{
|
||||
bool accessibilityEnabled = false;
|
||||
if (AXIsProcessTrustedWithOptions != NULL)
|
||||
{
|
||||
// 10.9 and later
|
||||
const void *keys[] = { kAXTrustedCheckOptionPrompt };
|
||||
const void *values[] = { kCFBooleanTrue };
|
||||
// 10.9 and later
|
||||
const void *keys[] = { kAXTrustedCheckOptionPrompt };
|
||||
const void *values[] = { kCFBooleanTrue };
|
||||
|
||||
CFDictionaryRef options = CFDictionaryCreate(
|
||||
kCFAllocatorDefault,
|
||||
keys,
|
||||
values,
|
||||
sizeof(keys) / sizeof(*keys),
|
||||
&kCFCopyStringDictionaryKeyCallBacks,
|
||||
&kCFTypeDictionaryValueCallBacks);
|
||||
CFDictionaryRef options = CFDictionaryCreate(
|
||||
kCFAllocatorDefault,
|
||||
keys,
|
||||
values,
|
||||
sizeof(keys) / sizeof(*keys),
|
||||
&kCFCopyStringDictionaryKeyCallBacks,
|
||||
&kCFTypeDictionaryValueCallBacks);
|
||||
|
||||
accessibilityEnabled = AXIsProcessTrustedWithOptions(options);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 10.8 and older
|
||||
accessibilityEnabled = AXAPIEnabled();
|
||||
}
|
||||
bool accessibilityEnabled = AXIsProcessTrustedWithOptions(options);
|
||||
|
||||
if (!accessibilityEnabled)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user