Commit c0366cbb authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Prevent user locale change in NtUserActivateKeyboardLayout.

parent 27c5abe3
......@@ -1193,6 +1193,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
{
struct user_thread_info *info = get_user_thread_info();
HKL old_layout;
LCID locale;
HWND focus;
TRACE_(keyboard)( "layout %p, flags %x\n", layout, flags );
......@@ -1206,6 +1207,13 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
return 0;
}
if (NtQueryDefaultLocale( TRUE, &locale ) || LOWORD(layout) != locale)
{
RtlSetLastWin32Error( ERROR_CALL_NOT_IMPLEMENTED );
FIXME_(keyboard)( "Changing user locale is not supported\n" );
return 0;
}
if (!user_driver->pActivateKeyboardLayout( layout, flags ))
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment