diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bac6d6..47df47b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ Tested on build 22000.348. * Mitigation for the issue described in #416 (.7) * Fixed a bug that prevented the Windows 10 window switcher from displaying when it was enabled, instead falling back to the Windows NT window switcher (#548) (.8) * Fixed the "Show People in the taskbar" option and made it not require a restart to apply (#554) (.10) +* Ability to choose look of Snap Assist (window list when snapping a window): Windows 11 or Windows 11 style (.11) +* Fixed a bug that prevented the correct set up of "DisplayVersion" registry entry in the uninstall information registry key (.11) #### Simple Window Switcher diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index b92ec9d..00f51be 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -73,6 +73,7 @@ DWORD bTaskbarAutohideOnDoubleClick = FALSE; DWORD dwOrbStyle = 0; DWORD bEnableSymbolDownload = TRUE; DWORD dwAltTabSettings = 0; +DWORD dwSnapAssistSettings = 0; HMODULE hModule = NULL; HANDLE hDelayedInjectionThread = NULL; HANDLE hIsWinXShown = NULL; @@ -3884,6 +3885,15 @@ void WINAPI LoadSettings(BOOL bIsExplorer) LaunchPropertiesGUI(hModule); #endif } + dwSize = sizeof(DWORD); + RegQueryValueExW( + hKey, + TEXT("SnapAssistSettings"), + 0, + NULL, + &dwSnapAssistSettings, + &dwSize + ); RegCloseKey(hKey); } @@ -5325,10 +5335,17 @@ DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall) INT64(*twinui_pcshell_IsUndockedAssetAvailableFunc)(INT a1, INT64 a2, INT64 a3, const char* a4); INT64 twinui_pcshell_IsUndockedAssetAvailableHook(INT a1, INT64 a2, INT64 a3, const char* a4) { - if (dwAltTabSettings == 3 || dwAltTabSettings == 2) + // if IsAltTab and AltTabSettings == Windows 10 or sws (Precision Touchpad gesture) + if (a1 == 1 && (dwAltTabSettings == 3 || dwAltTabSettings == 2)) + { + return 0; + } + // if IsSnapAssist and SnapAssistSettings == Windows 10 + else if (a1 == 4 && dwSnapAssistSettings == 3) { return 0; } + // else, show Windows 11 style basically else { return twinui_pcshell_IsUndockedAssetAvailableFunc(a1, a2, a3, a4); diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index 4b1e80d..46ce0dc 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -370,6 +370,11 @@ ;x 2 Shut down (default) ;x 4 Restart "Start_PowerButtonAction"=dword:00000002 +[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ExplorerPatcher] +;c 2 Snap Assist style +;x 0 Windows 11 (default) +;x 3 Windows 10 +"SnapAssistSettings"=dword:00000000 ;T Updates diff --git a/version.h b/version.h index f825f25..2e371ac 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define VER_MAJOR 22000 #define VER_MINOR 348 #define VER_BUILD_HI 40 -#define VER_BUILD_LO 10 +#define VER_BUILD_LO 11 #define VER_FLAGS VS_FF_PRERELEASE @@ -12,5 +12,5 @@ #define VER_STR(arg) #arg // The String form of the version numbers -#define VER_FILE_STRING VALUE "FileVersion", "22000.348.40.10" -#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.348.40.10" +#define VER_FILE_STRING VALUE "FileVersion", "22000.348.40.11" +#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.348.40.11"