Repository navigation
Hide native Windows 11 Start button when using a replacement - #2547
YellowNest wants to merge 66 commits into
Conversation
|
This is super awesome. Glad to see it works nicely. And I guess it should be used for more customizations and improvements related to start button and taskbar itself. Do you plan to work more in this area? I think it would be really appreciated. |
|
Another issue is that when I Starting |
|
Thanks for testing this carefully. Both reports were valid and pointed to separate problems in the initial TAP implementation. I pushed the follow-up in The Task View regression came from treating every The restart problem was a separate TAP lifetime issue. Shutdown now restores the XAML properties synchronously, removes the visual-tree callback with The build for the follow-up is here: The two paths that still deserve runtime confirmation are:
And yes, I plan to keep working in this area. Replacing |
Definitely. I'm glad you plan to work on this more. |
|
Thanks, I really appreciate that. I use Open-Shell myself, so contributing here is useful to me too. I care about keeping it working well on current Windows builds, and if I can help take some of the load off, I'm happy to. I also appreciate the trust you're putting in the work. Your reviews and testing are valuable, especially around these Windows 11 edge cases, so I'll keep changes focused and separate like you suggested. I've already started looking at the XAML input side in a separate research branch. The first build is clean, but I'll keep it out of upstream until I've tested the behavior properly. Glad to help. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Bundle current master with pending PRs Open-Shell#2547, Open-Shell#2548, Open-Shell#2551, Open-Shell#2552, and Open-Shell#2553 for local integration testing. This branch is test packaging only and is not intended for upstream merge.
2fb59e7 to
192b2e3
Compare
|
I think it is time to do step (or actually several steps) back. Right now the code is rather convoluted, full of weird complex constructs that cover edge cases that are not likely to happen. I think we should start with very simple approach that covers actual behavior of XAML Diagnostics framework. I have prepared the state that I have in my mind here: It is based on this PR, with greatly simplified TAP handling. I'm still not 100% satisfied with it (for example those variable/file names should not refer to Win11 and Start button as discussed elsewhere). But we should start with this. Please, if you don't mind, have a look. We can discuss any potential issues that may be still there and decide how (whether) to cover them. I really appreciate your time (and help with this). I'm trying to be supportive here, but I'm just not fully content with the direction it went. |
| { | ||
| wchar_t endpoint[64]; | ||
| swprintf_s(endpoint, L"VisualDiagConnection%d", retry + 1); | ||
| last = init(endpoint, GetCurrentProcessId(), NULL, |
There was a problem hiding this comment.
It seems that we have to always connect to VisualDiagConnection1 endpoint.
Currently the connection doesn't work during boot, because we load too early and the API fails (I guess XAML is not ready at that point). Then we are trying endpoints with different numbers and the API simply always fails.
If we connect to 1 always, it will eventually succeed (usually on second attempt).
Previous code where we cycled between 1/2 worked too. Because eventually we did try 1 again.
I'm not sure why other tools try those different endpoint names.
|
Thanks for taking the time to review this and put together a simpler implementation. I agree with your assessment. The current implementation has become unnecessarily complicated, and continuing in that direction would make future maintenance harder. I'll use your I appreciate your patience and the effort you've put into guiding this toward a cleaner solution. |
I have pushed few fixes to the branch. |
|
Ok, I have all things pushed in |

Summary
Hide the native Windows 11 Start button visuals while Open-Shell's replacement Start button is enabled.
Windows 11 renders the Start button through XAML, so the older HWND-based hiding logic cannot remove the native glyph. This caused custom Open-Shell buttons to be drawn on top of the Windows Start icon.
The change uses the Windows XAML diagnostics visual tree to:
All taskbarssettingThe replacement button itself is not moved or resized by this code, so Windows remains responsible for centered taskbar layout.
Verification
Tested on Windows 11 25H2 with centered taskbar:
Replace Start buttonrestores the native Windows Start button.GitHub Actions
Buildcompleted successfully for the current heade9039e3:https://github.com/Open-Shell/Open-Shell-Menu/actions/runs/37805091803
The lifecycle implementation avoids loading StartMenuHelper and initializing XAML Diagnostics when the replacement Start button is disabled.
Repeated Explorer exit/restart and complete injected DLL unloading still require runtime verification. A successful build does not establish those behaviors.
Fixes #1631