1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-15 03:27:35 +01:00

Ability to choose Snap Assist style

This commit is contained in:
Valentin Radu 2021-12-14 04:53:59 +02:00
parent dfd703004c
commit 94db02bde0
4 changed files with 28 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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"