Browse Source

Ability to choose Snap Assist style

pull/886/head 22000.348.40.11_94db02b
Valentin Radu 4 years ago
parent
commit
94db02bde0
  1. 2
      CHANGELOG.md
  2. 19
      ExplorerPatcher/dllmain.c
  3. 5
      ExplorerPatcher/settings.reg
  4. 6
      version.h

2
CHANGELOG.md

@ -30,6 +30,8 @@ Tested on build 22000.348. @@ -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

19
ExplorerPatcher/dllmain.c

@ -73,6 +73,7 @@ DWORD bTaskbarAutohideOnDoubleClick = FALSE; @@ -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) @@ -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) @@ -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);

5
ExplorerPatcher/settings.reg

@ -370,6 +370,11 @@ @@ -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

6
version.h

@ -1,7 +1,7 @@ @@ -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 @@ @@ -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"

Loading…
Cancel
Save