Skip to content

Commit

Permalink
GUI: Fix language switcher on OS builds 22621+
Browse files Browse the repository at this point in the history
  • Loading branch information
valinet committed Aug 6, 2022
1 parent de44754 commit 258d35c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions ExplorerPatcher/GUI.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
else if (!_stricmp(funcName, "IsWindows10StartMenu") && (dwRes = 0, RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"Start_ShowClassicMode", RRF_RT_DWORD, NULL, &dwRes, &dwSize), (dwRes != 1))) bSkipLines = TRUE;
else if (!_stricmp(funcName, "!IsWindows10StartMenu") && (dwRes = 0, RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"Start_ShowClassicMode", RRF_RT_DWORD, NULL, &dwRes, &dwSize), (dwRes == 1))) bSkipLines = TRUE;
else if (!_stricmp(funcName, "IsWeatherEnabled") && (dwRes = 0, RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\People", L"PeopleBand", RRF_RT_DWORD, NULL, &dwRes, &dwSize), (dwRes != 1))) bSkipLines = TRUE;
else if (!_stricmp(funcName, "IsWindows11Version22H2OrHigher") && !IsWindows11Version22H2OrHigher()) bSkipLines = TRUE;
else if (!_stricmp(funcName, "!IsWindows11Version22H2OrHigher") && IsWindows11Version22H2OrHigher()) bSkipLines = TRUE;
else if (!_stricmp(funcName, "!(IsWindows11Version22H2OrHigher&&!IsOldTaskbar)") && (IsWindows11Version22H2OrHigher() && (dwRes = 1, RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"OldTaskbar", RRF_RT_DWORD, NULL, &dwRes, &dwSize), (dwRes != 1)))) bSkipLines = TRUE;
if (bSkipLines)
Expand Down
5 changes: 5 additions & 0 deletions ExplorerPatcher/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -6363,6 +6363,11 @@ void WINAPI LoadSettings(LPARAM lParam)
&dwIMEStyle,
&dwSize
);
if (IsWindows11Version22H2OrHigher())
{
if (!dwIMEStyle) dwIMEStyle = 7;
else if (dwIMEStyle == 7) dwIMEStyle = 0;
}
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
Expand Down
11 changes: 11 additions & 0 deletions ExplorerPatcher/settings.reg
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,23 @@
;x 0 Windows 10 flyout (default)
;x 1 Windows 7
"UseWin32BatteryFlyout"=dword:00000000
;s SystemTray_LanguageSwitcherBefore22H2 !IsWindows11Version22H2OrHigher
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 3 Language switcher *
;x 0 Windows 11 (default)
;x 1 Windows 10 (with link to "Language Preferences")
;x 4 Windows 10
"IMEStyle"=dword:00000000
;g SystemTray_LanguageSwitcherBefore22H2
;s SystemTray_LanguageSwitcherAfter22H2 IsWindows11Version22H2OrHigher
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 Language switcher *
;x 0 Windows 11 (default)
;x 7 Windows 10
;x 1 Windows 10 (with link to "Language Preferences") (no animation)
;x 4 Windows 10 (no animation)
"IMEStyle"=dword:00000000
;g SystemTray_LanguageSwitcherAfter22H2
;g SystemTray_Windows10Section


Expand Down

0 comments on commit 258d35c

Please sign in to comment.