Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
052a9fc
Hide native Windows 11 Start button when using a replacement
YellowNest Oct 3, 2026
9f572bb
Fix Win11 TAP control matching and shutdown
YellowNest Oct 4, 2026
3a98698
Fix Win11 TAP teardown ordering
YellowNest Oct 4, 2026
192b2e3
Keep Win11 TAP connection worker resident
YellowNest Oct 4, 2026
440d76e
Isolate Win11 XAML TAP lifetime from StartMenuDLL
YellowNest Oct 5, 2026
2ec3d6d
Do not free XAML callback input strings
YellowNest Oct 5, 2026
4a7254f
Load StartMenuHelper from System32 as fallback
YellowNest Oct 6, 2026
422fe03
Avoid GetCurrentTime macro conflict in XAML headers
YellowNest Oct 6, 2026
0a769cd
Simplify full-path StartMenuHelper loading
YellowNest Oct 6, 2026
c3c353b
Use in-class initialization for StartElement
YellowNest Oct 6, 2026
2bce76c
Modernize Win11 TAP synchronization and COM lifetime
YellowNest Oct 6, 2026
789076a
Keep connection state after successful TAP attach
YellowNest Oct 6, 2026
676632b
Polish RAII locking in Win11 TAP
YellowNest Oct 6, 2026
39b84dc
Remove redundant XAML connection attempt thread
YellowNest Oct 6, 2026
d95836f
Polish XAML TAP state handling
YellowNest Oct 6, 2026
941bef1
Unify XAML connection failure cleanup
YellowNest Oct 6, 2026
b7af69c
Harden XAML TAP lifecycle and teardown
YellowNest Oct 7, 2026
bd5b5fa
Guard queued XAML apply work during shutdown
YellowNest Oct 7, 2026
19740e8
Serialize TAP enable state across teardown
YellowNest Oct 7, 2026
08d46b0
Avoid lifecycle lock across COM site queries
YellowNest Oct 7, 2026
05b6638
Verify XAML override restoration before teardown
YellowNest Oct 7, 2026
1b4e24c
Drain queued TAP work before dispatch teardown
YellowNest Oct 7, 2026
bee430c
Preserve TAP state when restore dispatch is unavailable
YellowNest Oct 7, 2026
5b0e2d9
Merge branch 'master' into fix/win11-native-start-button-overlap
ge0rdi Oct 7, 2026
969d104
Simplify Windows 11 TAP teardown and dispatch lifecycle
YellowNest Oct 8, 2026
5e3a2de
Preserve TAP window state on failed teardown and guard lifecycle publ…
YellowNest Oct 8, 2026
1e89949
Keep subscribed TAP available if rollback unadvise fails
YellowNest Oct 8, 2026
dd7ff3e
Align TAP dispatch window class with DLL lifetime
YellowNest Oct 8, 2026
60a63a1
Destroy TAP dispatch window before releasing diagnostics callback
YellowNest Oct 8, 2026
3d9c8b1
Hold published XAML TAP using an owned COM reference
YellowNest Oct 8, 2026
03f3d78
Deduplicate XAML override transitions and TAP activation
YellowNest Oct 8, 2026
30200ab
Restore tracked XAML overrides without tree lookup and release TAP site
YellowNest Oct 8, 2026
58a9ffa
Avoid XAML diagnostics connection when replacement Start button is di…
YellowNest Oct 8, 2026
e9039e3
Load Windows 11 TAP helper only when replacement is enabled
YellowNest Oct 8, 2026
88d99dd
Simplify TAP connection worker cleanup without changing endpoint probing
YellowNest Oct 10, 2026
a26f18b
Use direct synchronized TAP reference instead of redundant accessor
YellowNest Oct 10, 2026
22e92d9
Probe unique XAML diagnostics endpoint names per attempt
YellowNest Oct 10, 2026
277b6c8
Prevent visual-tree callbacks from queuing apply work during TAP shut…
YellowNest Oct 10, 2026
411800a
Keep TAP dispatch alive until visual-tree unadvise succeeds
YellowNest Oct 10, 2026
1e4e2b8
Stop XAML monitor after taskbar cleanup to prevent redundant restart
YellowNest Oct 10, 2026
468efc1
Report actual Win32 failure from synchronous TAP dispatch
YellowNest Oct 10, 2026
6ff655e
Inline single-use TAP reference lookup and remove helper
YellowNest Oct 10, 2026
7b0f05a
Reject truncated helper DLL paths before XAML diagnostics connection
YellowNest Oct 10, 2026
e1e86f1
Simplify SetSite to single-site ownership and explicit activation lif…
YellowNest Oct 10, 2026
1560512
Guard SetSite publication against concurrent shutdown
YellowNest Oct 10, 2026
8eef672
Reset TAP connect guard on late site shutdown
YellowNest Oct 10, 2026
19b393f
Reject competing TAP instances without replacing the subscribed owner
YellowNest Oct 10, 2026
883a7cc
Use one publication result instead of duplicate TAP race flags
YellowNest Oct 10, 2026
59abedc
Prevent stale TAP instances from resetting active connection state
YellowNest Oct 10, 2026
20ab1ad
Keep late TAP shutdown from clearing a newer connection attempt
YellowNest Oct 10, 2026
aa04fff
Synchronize GetSite with SetSite without calling COM under the lifecy…
YellowNest Oct 10, 2026
4279bc7
Make GetSite reentrancy-safe using existing state mutex for site snap…
YellowNest Oct 10, 2026
2bf09c8
Reserve TAP ownership before XAML subscription and simplify SetSite r…
YellowNest Oct 10, 2026
70bd544
Release TAP owner after successful Unadvise even when Start races Stop
YellowNest Oct 10, 2026
f207d02
Serialize TAP connection state and remove cross-thread connection fla…
YellowNest Oct 10, 2026
593561f
Reconcile latest Start request after overlapping TAP Stop teardown
YellowNest Oct 10, 2026
1734bd0
Retry only interrupted failed diagnostics attempts after Stop/Start r…
YellowNest Oct 10, 2026
1712e1c
Recover one interrupted Start when TAP worker creation fails
YellowNest Oct 10, 2026
5d83158
Fold interrupted-worker retry into one TAP connection state
YellowNest Oct 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "ResourceHelper.h"
#include "LogManager.h"
#include "TouchHelper.h"
#include "Win11StartButton.h"
#include "IatHookHelper.h"
#include "dllmain.h"
#include <uxtheme.h>
Expand Down Expand Up @@ -2643,6 +2644,7 @@ void UpdateTaskBars( TUpdateTaskbar update )
InvalidateRect(taskBar.taskBar,NULL,TRUE);
PostMessage(taskBar.taskBar,WM_THEMECHANGED,0,0);
}
UpdateWin11StartButtonMonitor();
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -3227,6 +3229,7 @@ if (!g_bTrimHooks)

UpdateTaskBars(TASKBAR_RECREATE_BUTTONS);
UpdateTaskBars(TASKBAR_UPDATE_TEXTURE);
StartWin11StartButtonMonitor();
}

static void RecreateStartButton( size_t taskbarId )
Expand Down Expand Up @@ -3288,6 +3291,7 @@ static DWORD WINAPI ExitThreadProc( void *param )

static void CleanStartMenuDLL( void )
{

ClearIatHook(g_DwmpBTRHook);
g_DwmpBTRHook=NULL;
ClearIatHook(g_DwmpTWWRHook);
Expand Down Expand Up @@ -3340,6 +3344,7 @@ static void CleanStartMenuDLL( void )
}
ResetHotCorners();
UpdateTaskBars(TASKBAR_CLEAR);
StopWin11StartButtonMonitor();
g_WinStartButton=NULL;
for (id_taskbar_map::const_iterator it=g_TaskbarInfos.begin();it!=g_TaskbarInfos.end();++it)
{
Expand Down
2 changes: 2 additions & 0 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="TouchHelper.cpp" />
<ClCompile Include="Win11StartButton.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Accessibility.h" />
Expand All @@ -110,6 +111,7 @@
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="TouchHelper.h" />
<ClInclude Include="Win11StartButton.h" />
</ItemGroup>
<ItemGroup>
<Image Include="..\..\Setup\OpenShell.ico" />
Expand Down
6 changes: 6 additions & 0 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
<ClCompile Include="TouchHelper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Win11StartButton.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Accessibility.h">
Expand Down Expand Up @@ -128,6 +131,9 @@
<ClInclude Include="TouchHelper.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Win11StartButton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Resource Files</Filter>
</ClInclude>
Expand Down
122 changes: 122 additions & 0 deletions Src/StartMenu/StartMenuDLL/Win11StartButton.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// Windows 11 native Start button suppression bridge.
//
// XAML Diagnostics retains its TAP site object for the diagnostics session.
// The TAP therefore lives in StartMenuHelper, which may remain resident in
// Explorer, while StartMenuDLL can still unload/reload on Exit.

#include "stdafx.h"
#include "Win11StartButton.h"
#include "Settings.h"
#include "LogManager.h"
#include "ResourceHelper.h"

typedef void (__cdecl *StartWin11StartButtonTap_t)( BOOL enabled, BOOL allTaskbars );
typedef void (__cdecl *UpdateWin11StartButtonTap_t)( BOOL enabled, BOOL allTaskbars );
typedef void (__cdecl *StopWin11StartButtonTap_t)( void );

static HMODULE g_StartButtonTapModule = NULL;
static StartWin11StartButtonTap_t g_StartButtonTapStart = NULL;
static UpdateWin11StartButtonTap_t g_StartButtonTapUpdate = NULL;
static StopWin11StartButtonTap_t g_StartButtonTapStop = NULL;

static bool LoadStartButtonTap( void )
{
if (g_StartButtonTapModule)
return true;

#ifdef _WIN64
const wchar_t helperName[] = L"StartMenuHelper64.dll";
#else
const wchar_t helperName[] = L"StartMenuHelper32.dll";
#endif

// Prefer a helper next to StartMenuDLL for local development builds, but
// installed Open-Shell keeps StartMenuHelper in System32.
HMODULE module = NULL;
wchar_t path[MAX_PATH];
DWORD pathLength = GetModuleFileName(g_Instance, path, _countof(path));
if (pathLength && pathLength < _countof(path))
{
wchar_t *name = wcsrchr(path, L'\\');
if (name)
{
name++;
const size_t remaining = path + _countof(path) - name;
if (_countof(helperName) <= remaining)
{
wcscpy_s(name, remaining, helperName);
module = LoadLibrary(path);
}
}
}

if (!module)
module = LoadLibraryEx(helperName, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);

if (!module)
{
LogToFile(STARTUP_LOG, L"Win11StartButton: unable to load TAP helper 0x%08X", GetLastError());
return false;
}

StartWin11StartButtonTap_t start =
(StartWin11StartButtonTap_t)GetProcAddress(module, "StartWin11StartButtonTap");
UpdateWin11StartButtonTap_t update =
(UpdateWin11StartButtonTap_t)GetProcAddress(module, "UpdateWin11StartButtonTap");
StopWin11StartButtonTap_t stop =
(StopWin11StartButtonTap_t)GetProcAddress(module, "StopWin11StartButtonTap");
if (!start || !update || !stop)
{
LogToFile(STARTUP_LOG, L"Win11StartButton: TAP helper exports are unavailable");
FreeLibrary(module);
return false;
}

g_StartButtonTapModule = module;
g_StartButtonTapStart = start;
g_StartButtonTapUpdate = update;
g_StartButtonTapStop = stop;
return true;
}

void StartWin11StartButtonMonitor( void )
{
if (!IsWin11() || !GetSettingBool(L"EnableStartButton") || !LoadStartButtonTap())
return;

g_StartButtonTapStart(TRUE, GetSettingBool(L"AllTaskbars"));
}

void UpdateWin11StartButtonMonitor( void )
{
if (!IsWin11())
return;

BOOL enabled = GetSettingBool(L"EnableStartButton");
BOOL allTaskbars = GetSettingBool(L"AllTaskbars");
if (!g_StartButtonTapModule)
{
// Start on first enable if the helper was not needed at startup.
if (enabled && LoadStartButtonTap())
g_StartButtonTapStart(enabled, allTaskbars);
return;
}

g_StartButtonTapUpdate(enabled, allTaskbars);
}

void StopWin11StartButtonMonitor( void )
{
if (!IsWin11() || !g_StartButtonTapModule)
return;

g_StartButtonTapStop();

// Drop only StartMenuDLL's explicit reference. XAML Diagnostics owns the TAP
// module reference for the diagnostics session after a successful connection.
FreeLibrary(g_StartButtonTapModule);
g_StartButtonTapModule = NULL;
g_StartButtonTapStart = NULL;
g_StartButtonTapUpdate = NULL;
g_StartButtonTapStop = NULL;
}
8 changes: 8 additions & 0 deletions Src/StartMenu/StartMenuDLL/Win11StartButton.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once

// Windows 11 draws the native Start button in XAML. These helpers hide only
// the native glyph/hit target while Open-Shell's replacement button is active.
// They never move or resize either button.
void StartWin11StartButtonMonitor( void );
void UpdateWin11StartButtonMonitor( void );
void StopWin11StartButtonMonitor( void );
6 changes: 6 additions & 0 deletions Src/StartMenu/StartMenuHelper/StartMenuHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "resource.h"
#include "StartMenuHelper_h.h"
#include "dllmain.h"
#include "Win11StartButtonTap.h"
#include "ResourceHelper.h"
#include "Settings.h"
#include "StringUtils.h"
Expand Down Expand Up @@ -206,6 +207,11 @@ static void StartStartMenu( void )
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
WaitDllInitThread();

HRESULT tapResult = GetWin11StartButtonTapClassObject(rclsid, riid, ppv);
if (tapResult != CLASS_E_CLASSNOTAVAILABLE)
return tapResult;

if (rclsid==g_EmulationClsid)
{
LogToFile(STARTUP_LOG,L"StartMenuHelper: DllGetClassObject1");
Expand Down
2 changes: 2 additions & 0 deletions Src/StartMenu/StartMenuHelper/StartMenuHelper.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<ClCompile Include="ModernSettingsShellFolder.cpp" />
<ClCompile Include="StartMenuExt.cpp" />
<ClCompile Include="StartMenuHelper.cpp" />
<ClCompile Include="Win11StartButtonTap.cpp" />
<ClCompile Include="StartMenuHelper_i.c">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
Expand Down Expand Up @@ -138,6 +139,7 @@
<ClInclude Include="Resource.h" />
<ClInclude Include="StartMenuExt.h" />
<ClInclude Include="StartMenuHelper_h.h" />
<ClInclude Include="Win11StartButtonTap.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions Src/StartMenu/StartMenuHelper/StartMenuHelper.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
<ClCompile Include="ModernSettingsContextMenu.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Win11StartButtonTap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Midl Include="StartMenuHelper.idl">
Expand Down Expand Up @@ -100,6 +103,9 @@
<ClInclude Include="ModernSettingsContextMenu.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Win11StartButtonTap.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="StartMenuHelper.rc">
Expand Down
3 changes: 3 additions & 0 deletions Src/StartMenu/StartMenuHelper/StartMenuHelper32.def
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ EXPORTS
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE
DllInstall PRIVATE
StartWin11StartButtonTap
UpdateWin11StartButtonTap
StopWin11StartButtonTap
3 changes: 3 additions & 0 deletions Src/StartMenu/StartMenuHelper/StartMenuHelper64.def
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ EXPORTS
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE
DllInstall PRIVATE
StartWin11StartButtonTap
UpdateWin11StartButtonTap
StopWin11StartButtonTap
Loading