mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 19:25:49 +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 CKeyboardMac::init()
|
||||||
{
|
{
|
||||||
bool accessibilityEnabled = false;
|
// 10.9 and later
|
||||||
if (AXIsProcessTrustedWithOptions != NULL)
|
const void *keys[] = { kAXTrustedCheckOptionPrompt };
|
||||||
{
|
const void *values[] = { kCFBooleanTrue };
|
||||||
// 10.9 and later
|
|
||||||
const void *keys[] = { kAXTrustedCheckOptionPrompt };
|
|
||||||
const void *values[] = { kCFBooleanTrue };
|
|
||||||
|
|
||||||
CFDictionaryRef options = CFDictionaryCreate(
|
CFDictionaryRef options = CFDictionaryCreate(
|
||||||
kCFAllocatorDefault,
|
kCFAllocatorDefault,
|
||||||
keys,
|
keys,
|
||||||
values,
|
values,
|
||||||
sizeof(keys) / sizeof(*keys),
|
sizeof(keys) / sizeof(*keys),
|
||||||
&kCFCopyStringDictionaryKeyCallBacks,
|
&kCFCopyStringDictionaryKeyCallBacks,
|
||||||
&kCFTypeDictionaryValueCallBacks);
|
&kCFTypeDictionaryValueCallBacks);
|
||||||
|
|
||||||
accessibilityEnabled = AXIsProcessTrustedWithOptions(options);
|
bool accessibilityEnabled = AXIsProcessTrustedWithOptions(options);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 10.8 and older
|
|
||||||
accessibilityEnabled = AXAPIEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!accessibilityEnabled)
|
if (!accessibilityEnabled)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user