Skip to content

Commit

Permalink
Taskbar11: Fixed a bug that reset the "never combine" setting on OS b…
Browse files Browse the repository at this point in the history
…uilds 22621.2361+
  • Loading branch information
valinet committed Oct 3, 2023
1 parent 0706393 commit 085b3dd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 41 deletions.
51 changes: 10 additions & 41 deletions ExplorerPatcher/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -11506,51 +11506,20 @@ DWORD Inject(BOOL bIsExplorer)
ResetEvent(hEvent);
}*/

if (bOldTaskbar)
{
if (IsWindows11())
{
CreateThread(
0,
0,
PlayStartupSound,
0,
0,
0
);
if (IsWindows11()) {
if (bOldTaskbar) {
CreateThread(0, 0, PlayStartupSound, 0, 0, 0);
printf("Play startup sound thread...\n");
}
}


if (bOldTaskbar)
{
if (IsWindows11())
{
CreateThread(
0,
0,
SignalShellReady,
dwExplorerReadyDelay,
0,
0
);
CreateThread(0, 0, SignalShellReady, dwExplorerReadyDelay, 0, 0);
printf("Signal shell ready...\n");
} else {
CreateThread(0, 0, FixTaskbarAutohide, 0, 0, 0);
if (!IsWindows11Version22H2Build2361OrHigher()) {
RegDeleteKeyValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"TaskbarGlomLevel");
RegDeleteKeyValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"MMTaskbarGlomLevel");
}
}
}
else
{
CreateThread(
0,
0,
FixTaskbarAutohide,
0,
0,
0
);
RegDeleteKeyValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"TaskbarGlomLevel");
RegDeleteKeyValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"MMTaskbarGlomLevel");
}

if (IsWindows11Version22H2OrHigher() && bOldTaskbar)
{
Expand Down
1 change: 1 addition & 0 deletions ExplorerPatcher/lvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <winstring.h>
#include <stdio.h>
#include <Shlwapi.h>
#include "osutility.h"

#define LVT_LOC_NONE 0
#define LVT_LOC_BOTTOMLEFT 1
Expand Down
7 changes: 7 additions & 0 deletions ExplorerPatcher/osutility.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,11 @@ inline BOOL IsWindows11Version22H2Build2134OrHigher()
if (global_rovi.dwBuildNumber > 22621) return TRUE;
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 2134;
}

inline BOOL IsWindows11Version22H2Build2361OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_rovi.dwBuildNumber > 22621) return TRUE;
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 2361;
}
#endif

0 comments on commit 085b3dd

Please sign in to comment.