mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[KBSWITCH] Update layout list on WM_NOTIFYICONMSG
The layout list was not updated correctly. CORE-10667
This commit is contained in:
parent
aed376e00f
commit
87f94aa10c
1 changed files with 5 additions and 10 deletions
|
@ -144,18 +144,11 @@ static VOID UpdateLayoutList(HKL hKL OPTIONAL)
|
||||||
INT iKL;
|
INT iKL;
|
||||||
|
|
||||||
if (!hKL)
|
if (!hKL)
|
||||||
{
|
|
||||||
if (0 <= (g_nCurrentLayoutNum - 1) && (g_nCurrentLayoutNum - 1) < g_cKLs)
|
|
||||||
{
|
|
||||||
hKL = g_ahKLs[g_nCurrentLayoutNum - 1];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
HWND hwndTarget = (g_hwndLastActive ? g_hwndLastActive : GetForegroundWindow());
|
HWND hwndTarget = (g_hwndLastActive ? g_hwndLastActive : GetForegroundWindow());
|
||||||
DWORD dwTID = GetWindowThreadProcessId(hwndTarget, NULL);
|
DWORD dwTID = GetWindowThreadProcessId(hwndTarget, NULL);
|
||||||
hKL = GetKeyboardLayout(dwTID);
|
hKL = GetKeyboardLayout(dwTID);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_cKLs = GetKeyboardLayoutList(ARRAYSIZE(g_ahKLs), g_ahKLs);
|
g_cKLs = GetKeyboardLayoutList(ARRAYSIZE(g_ahKLs), g_ahKLs);
|
||||||
|
|
||||||
|
@ -737,6 +730,8 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
{
|
{
|
||||||
|
UpdateLayoutList(NULL);
|
||||||
|
|
||||||
GetCursorPos(&pt);
|
GetCursorPos(&pt);
|
||||||
SetForegroundWindow(hwnd);
|
SetForegroundWindow(hwnd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue