merge 1.3 r892:893 into 1.4 and trunk
This commit is contained in:
parent
4e585b87a4
commit
556422516c
|
@ -270,20 +270,17 @@ COSXKeyState::mapKeyFromEvent(CKeyIDs& ids,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool layoutValid = false;
|
|
||||||
const UCKeyboardLayout* layout;
|
|
||||||
|
|
||||||
// translate via uchr resource
|
// translate via uchr resource
|
||||||
#if defined(MAC_OS_X_VERSION_10_5)
|
#if defined(MAC_OS_X_VERSION_10_5)
|
||||||
CFDataRef ref = (CFDataRef) TISGetInputSourceProperty(currentKeyboardLayout,
|
CFDataRef ref = (CFDataRef) TISGetInputSourceProperty(currentKeyboardLayout,
|
||||||
kTISPropertyUnicodeKeyLayoutData);
|
kTISPropertyUnicodeKeyLayoutData);
|
||||||
layout = (const UCKeyboardLayout*) CFDataGetBytePtr(ref);
|
const UCKeyboardLayout* layout = (const UCKeyboardLayout*) CFDataGetBytePtr(ref);
|
||||||
layoutValid = (layout != null);
|
const bool layoutValid = (layout != NULL);
|
||||||
#else
|
#else
|
||||||
const void* resource;
|
const void* resource;
|
||||||
int err = KLGetKeyboardLayoutProperty(currentKeyboardLayout, kKLuchrData, &resource);
|
int err = KLGetKeyboardLayoutProperty(currentKeyboardLayout, kKLuchrData, &resource);
|
||||||
layoutValid == (err == noErr);
|
const bool layoutValid == (err == noErr);
|
||||||
layout = (const UCKeyboardLayout*)resource;
|
const UCKeyboardLayout* layout = (const UCKeyboardLayout*)resource;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (layoutValid) {
|
if (layoutValid) {
|
||||||
|
@ -423,7 +420,7 @@ COSXKeyState::getKeyMap(CKeyMap& keyMap)
|
||||||
|
|
||||||
// NB: not sure why support for KCHR was
|
// NB: not sure why support for KCHR was
|
||||||
// remvoed in 10.5 version?
|
// remvoed in 10.5 version?
|
||||||
#if defined(MAC_OS_X_VERSION_10_5)
|
#if !defined(MAC_OS_X_VERSION_10_5)
|
||||||
// try KCHR resource
|
// try KCHR resource
|
||||||
if (KLGetKeyboardLayoutProperty(m_groups[g],
|
if (KLGetKeyboardLayoutProperty(m_groups[g],
|
||||||
kKLKCHRData, &resource) == noErr) {
|
kKLKCHRData, &resource) == noErr) {
|
||||||
|
|
Loading…
Reference in New Issue