It can change keyboard layout from English to Russian by klicking on buttons "En" and "Ru" and by klicking on "En" and "Ru" textboxes.
I tried to run it on my Windows 10 and it works good. All functions work as designed.
But when I installed last version of Wine (wine-8-8) on my Astra linux 1.7_x86-64 OS and run this test application with wine (./wine ~/test_language.exe), it has not been working as it should.
It have opened without problems and UI has also been visible.
But when I clicked to buttons "En", "Ru" and text boxes, it was not changing the keyboard layout.
In terminal console I could see next messages:
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0024:fixme:thread:GetThreadUILanguage : stub, returning default language.
0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0072D9D0, 00000000 0072D9F8
0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x419 0072D9D0 00000000 0072D9F8) returning a dummy value (current locale)
0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0072D9D0, 022D19B0 0072D9F8
0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x419 0072D9D0 022D19B0 0072D9F8) returning a dummy value (current locale)
0024:fixme:wtsapi:WTSRegisterSessionNotification Stub 0001007E 0x00000000
0024:fixme:uxtheme:BufferedPaintInit Stub ()
006c:fixme:imm:ImeSetActiveContext himc 0000000000010026, flag 0 stub!
0024:fixme:imm:ImeSetActiveContext himc 00010076, flag 0x1 stub!
0024:fixme
0024:fixme
0024:fixme
0024:fixme
0024:fixme
0024:fixme
0024:fixme
0024:fixme
0024:fixme:wtsapi:WTSUnRegisterSessionNotification Stub 0001007E
I suppose that the problem is not working function "LoadKeyboardLayoutW". Because as you see it was trying to load Russian language (L"00000409").
But after English language was activated instead (X11DRV_ActivateKeyboardLayout 0x4190419).
I tried to find this function in wine build files. I only found X11DRV_ActivateKeyboardLayout it in wine-8.8/dlls/winex11.drv/keyboard.c. It is below:
/***********************************************************************
* ActivateKeyboardLayout (X11DRV.@)
*/
HKL CDECL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
{
HKL oldHkl = 0;
struct x11drv_thread_data *thread_data = x11drv_init_thread_data();
FIXME("%p, %04x: semi-stub!\n", hkl, flags);
if (flags & KLF_SETFORPROCESS)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
FIXME("KLF_SETFORPROCESS not supported\n");
return 0;
}
if (flags)
FIXME("flags %x not supported\n",flags);
if (hkl == (HKL)HKL_NEXT || hkl == (HKL)HKL_PREV)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
FIXME("HKL_NEXT and HKL_PREV not supported\n");
return 0;
}
if (!match_x11_keyboard_layout(hkl))
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
FIXME("setting keyboard of different locales not supported\n");
return 0;
}
oldHkl = thread_data->kbd_layout;
if (!oldHkl) oldHkl = get_locale_kbd_layout();
thread_data->kbd_layout = hkl;
return oldHkl;
}
Could someone please suggest some fixes for that please?
Thanks in advance!