cocoa: Account for getting a keyboard using input methods correctly
When a keyboard is using an input method then the layout for it needs to be retrieved with TISCopyInputMethodKeyboardLayoutOverride(). For cases where it is not using an input method this will return null and in that case we can use the original approach as before. Task-number: QTBUG-53804 Task-number: QTBUG-57934 Change-Id: I6283785bf002602113e208bb38d5eb2a9a7ceb36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
2005b9fae1
commit
25b00c88b6
|
|
@ -366,7 +366,9 @@ Qt::KeyboardModifiers QCocoaKeyMapper::queryKeyboardModifiers()
|
|||
bool QCocoaKeyMapper::updateKeyboard()
|
||||
{
|
||||
const UCKeyboardLayout *uchrData = 0;
|
||||
QCFType<TISInputSourceRef> source = TISCopyCurrentKeyboardInputSource();
|
||||
QCFType<TISInputSourceRef> source = TISCopyInputMethodKeyboardLayoutOverride();
|
||||
if (!source)
|
||||
source = TISCopyCurrentKeyboardInputSource();
|
||||
if (keyboard_mode != NullMode && source == currentInputSource) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue