Windows QPA: Add missing calls to keyboard initialization
Add calls to changeKeyboard() to the QWindowsKeyMapper constructor and the handling of WM_INPUTLANGCHANGE so that the locale is correctly initialized and changes are processed. Change-Id: Ia30d8c6434ca85165e4882240ae16f9a75dcf4ff Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>bb10
parent
f7980f4eda
commit
1b1fd81a81
|
|
@ -102,6 +102,7 @@ QWindowsKeyMapper::QWindowsKeyMapper()
|
|||
QGuiApplication *app = static_cast<QGuiApplication *>(QGuiApplication::instance());
|
||||
QObject::connect(app, &QGuiApplication::applicationStateChanged,
|
||||
app, clearKeyRecorderOnApplicationInActive);
|
||||
changeKeyboard();
|
||||
}
|
||||
|
||||
QWindowsKeyMapper::~QWindowsKeyMapper()
|
||||
|
|
@ -810,7 +811,7 @@ bool QWindowsKeyMapper::translateKeyEvent(QWindow *widget, HWND hwnd,
|
|||
|
||||
// Reset layout map when system keyboard layout is changed
|
||||
if (msg.message == WM_INPUTLANGCHANGE) {
|
||||
deleteLayouts();
|
||||
changeKeyboard();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue