Author: dchapyshev
Date: Tue Aug 9 21:41:05 2016
New Revision: 72175
URL:
http://svn.reactos.org/svn/reactos?rev=72175&view=rev
Log:
[KBSWITCH]
- Hackfix detecting keyboard layout switching
* Now when hotkeys switching layouts icon changes
Modified:
trunk/reactos/base/applications/kbswitch/kbswitch.c
Modified: trunk/reactos/base/applications/kbswitch/kbswitch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
==============================================================================
--- trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] Tue Aug 9 21:41:05
2016
@@ -12,6 +12,7 @@
PKBSWITCHSETHOOKS KbSwitchSetHooks = NULL;
PKBSWITCHDELETEHOOKS KbSwitchDeleteHooks = NULL;
+UINT ShellHookMessage = 0;
static BOOL
@@ -524,6 +525,12 @@
break;
}
+ if (Message == ShellHookMessage && wParam == HSHELL_LANGUAGE)
+ {
+ PostMessage(hwnd, WM_LANG_CHANGED, wParam, lParam);
+ return 0;
+ }
+
return DefWindowProc(hwnd, Message, wParam, lParam);
}
@@ -533,6 +540,7 @@
WNDCLASS WndClass = {0};
MSG msg;
HANDLE hMutex;
+ HWND hwnd;
switch (GetUserDefaultUILanguage())
{
@@ -573,7 +581,9 @@
return 1;
}
- CreateWindow(szKbSwitcherName, NULL, 0, 0, 0, 1, 1, HWND_DESKTOP, NULL, hInstance,
NULL);
+ hwnd = CreateWindow(szKbSwitcherName, NULL, 0, 0, 0, 1, 1, HWND_DESKTOP, NULL,
hInstance, NULL);
+ ShellHookMessage = RegisterWindowMessage(L"SHELLHOOK");
+ RegisterShellHookWindow(hwnd);
while(GetMessage(&msg,NULL,0,0))
{