Repository navigation
Conversation
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 TAP to: - collapse the native Start glyph - disable hit testing on the underlying native Start control - preserve the native control's layout slot - restore the original XAML properties when replacement is disabled or Open-Shell exits - respect the All taskbars setting The replacement button itself is not moved or resized by this code, so Windows remains responsible for centered taskbar layout. TAP mechanism usage was inspired by TranslucentTB and UWPSpy projects. Fixes #1631
9b57280 to
21e3d35
Compare
|
I reviewed the replacement implementation. The simplified structure looks much better. I noticed one state transition worth correcting in OnVisualTreeChange: when an Icon element is recreated under an existing Start control, glyph is updated but visibilityOverride retains the state of the previous glyph. If that flag is already true, ApplyState skips setting Visibility on the new glyph. A one-line reset when assigning the new glyph appears sufficient: This is based on code-path analysis, not yet a reproduced Windows 11 UI failure. |
|
@YellowNest Do you know by any means how to force Windows to re-create the start button/glyph? I'm also testing with multiple monitors (well, two) and here it works nicely - with one monitor active there is one button announced, then when I turn on the other monitor new button/glyph is added. So the code handles it nicely. Also I was curious whether |
|
I ran an instrumented Windows 11 x64 test against 10877cb to investigate the XAML Add/Remove behavior. Results:
The results are consistent with AdviseVisualTreeChange replaying existing elements for each new subscription. I found no evidence that a live element receives duplicate Add notifications within the same subscription. I also haven't found a reliable way to force recreation of the glyph under an existing Start control. The helper DLL was absent from Explorer's loaded module list after shutdown, including observations up to 180 seconds later. Test run: Based on these observations, I don't see a reason to add more defensive handling to the current implementation. |
This is replacement of #2547 PR by @YellowNest who did great job with introducing TAP into
Open-Shelland made all this possible. Big thanks for that!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 TAP to:
The replacement button itself is not moved or resized by this code, so Windows remains responsible for centered taskbar layout.
TAP mechanism usage was inspired by TranslucentTB and UWPSpy projects.
Fixes #1631