1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-02-17 19:09:25 +01:00

Revert "When restarting Explorer from Properties, taskbar position is reapplied only when it differes from the previous value"

This reverts commit 4b0bae46c5a1650504ee1dc2da64f777553838e8.
This commit is contained in:
Valentin Radu 2021-12-10 04:01:42 +02:00
parent d7885414f2
commit 31c9c9604f

View File

@ -7,8 +7,6 @@ BOOL g_darkModeEnabled = FALSE;
static void(*RefreshImmersiveColorPolicyState)() = NULL; static void(*RefreshImmersiveColorPolicyState)() = NULL;
static BOOL(*ShouldAppsUseDarkMode)() = NULL; static BOOL(*ShouldAppsUseDarkMode)() = NULL;
DWORD dwTaskbarPosition = 3; DWORD dwTaskbarPosition = 3;
DWORD dwInitialTaskbarPosition = 3;
BOOL IsHighContrast() BOOL IsHighContrast()
{ {
HIGHCONTRASTW highContrast; HIGHCONTRASTW highContrast;
@ -813,10 +811,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
GetWindowsDirectoryW(wszPath, MAX_PATH); GetWindowsDirectoryW(wszPath, MAX_PATH);
wcscat_s(wszPath, MAX_PATH, L"\\explorer.exe"); wcscat_s(wszPath, MAX_PATH, L"\\explorer.exe");
Sleep(1000); Sleep(1000);
if (dwTaskbarPosition != dwInitialTaskbarPosition) GUI_RegSetValueExW(NULL, L"Virtualized_" _T(EP_CLSID) L"_TaskbarPosition", NULL, NULL, &dwTaskbarPosition, NULL);
{
GUI_RegSetValueExW(NULL, L"Virtualized_" _T(EP_CLSID) L"_TaskbarPosition", NULL, NULL, &dwTaskbarPosition, NULL);
}
ShellExecuteW( ShellExecuteW(
NULL, NULL,
L"open", L"open",
@ -2100,7 +2095,6 @@ __declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLin
} }
} }
GUI_RegQueryValueExW(NULL, L"Virtualized_" _T(EP_CLSID) L"_TaskbarPosition", NULL, NULL, &dwTaskbarPosition, NULL); GUI_RegQueryValueExW(NULL, L"Virtualized_" _T(EP_CLSID) L"_TaskbarPosition", NULL, NULL, &dwTaskbarPosition, NULL);
dwInitialTaskbarPosition = dwTaskbarPosition;
HWND hwnd = CreateWindowEx( HWND hwnd = CreateWindowEx(
NULL, NULL,
L"ExplorerPatcher_GUI_" _T(EP_CLSID), L"ExplorerPatcher_GUI_" _T(EP_CLSID),