File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1- #define BUILD_NUMBER 8177
1+ #define BUILD_NUMBER 8178
Original file line number Diff line number Diff line change 2525
2626namespace {
2727 bool g_Enabled = false ;
28+ bool g_UnloadHKL = false ;
2829 HKL g_ForcedHKL = nullptr ;
2930 HKL g_PreviousHKL = nullptr ;
3031};
@@ -74,6 +75,7 @@ void KeyboardLayout::ForceKeyboardLayout(DWORD layoutID)
7475 WCHAR klidStr[16 ] = {};
7576 swprintf_s (klidStr, L" %08X" , layoutID);
7677
78+ g_UnloadHKL = true ;
7779 foundID = LoadKeyboardLayoutW (klidStr, KLF_NOTELLSHELL | KLF_SUBSTITUTE_OK);
7880 }
7981
@@ -144,6 +146,11 @@ void KeyboardLayout::DisableForcedKeyboardLayout()
144146
145147 UnSetLayout ();
146148
149+ if (g_UnloadHKL && g_ForcedHKL)
150+ {
151+ UnloadKeyboardLayout (g_ForcedHKL);
152+ }
153+
147154 AttachThreadInput (curThread, fgThread, FALSE );
148155 }
149156}
You can’t perform that action at this time.
0 commit comments