From 1b1fd81a811297414d0e7d8090fbc7a682c85313 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 25 Apr 2018 08:46:28 +0200 Subject: 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 --- src/plugins/platforms/windows/qwindowskeymapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index 5a8a45cbf6..35f81f0165 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -102,6 +102,7 @@ QWindowsKeyMapper::QWindowsKeyMapper() QGuiApplication *app = static_cast(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; } -- cgit v1.2.3