From 25660c908ac51e4cb930232a261096f84a6b66ac Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sat, 6 Aug 2022 23:38:22 +0300 Subject: [PATCH] GUI, Main: Disable non-functional Snap Assist style option on OS builds 22621+ --- ExplorerPatcher/dllmain.c | 2 +- ExplorerPatcher/settings.reg | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 9b58640c6..ba38f5717 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -9651,7 +9651,7 @@ INT64 twinui_pcshell_IsUndockedAssetAvailableHook(INT a1, INT64 a2, INT64 a3, co return 0; } // if IsSnapAssist and SnapAssistSettings == Windows 10 - else if (a1 == 4 && dwSnapAssistSettings == 3) + else if (a1 == 4 && dwSnapAssistSettings == 3 && !IsWindows11Version22H2OrHigher()) { return 0; } diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index 3d9ea94dd..06325d85a 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -631,11 +631,13 @@ [HKEY_CURRENT_USER\Software\ExplorerPatcher] ;b Disable quadrants when snapping windows * "DisableAeroSnapQuadrants"=dword:00000000 +;s Other_SnapAssistStyle !IsWindows11Version22H2OrHigher [HKEY_CURRENT_USER\Software\ExplorerPatcher] ;c 2 Snap Assist style ;x 0 Windows 11 (default) ;x 3 Windows 10 "SnapAssistSettings"=dword:00000000 +;g Other_SnapAssistStyle [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] ;c 6 Default action in the Alt+F4 dialog on the desktop ;x 256 Switch user