Update Win32 UI modernizer#4850
Conversation
* Fixed the mod getting stuck on unloading * Fixed the glyphs blocking the File Explorer thread while animating. * Made the glyphs use direct composition when inside File Explorer * Fixed black background behind glyphs * Styled the Registry Editor separator * Styled the old address bar's overflow chevron * Enhanced text rendering * Added a new Fade animation option for the navigation panel pill * The buttons and combo boxes styles are now closer to the winui ones * Changed the focus border option into a drop down and fixed the style not being applied * Added styles for missing controls * Corrected non dpi aware styles * Fixed the "Optimize Drives" window not being painted dark * Fixed leaks * Removed dead code * Hardened glyphs detection
Submission reviewNote: This review was done by Claude, and then refined manually. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. Not sure about 2. Most other items seem like actual issues. 1. Deadlock on unload — std::lock_guard<std::recursive_mutex> lk(g_checkAnimsMutex); // 3648
for (auto& [key, anim] : g_checkAnims) {
...
KillTimer(hw, kCheckTimerId);
WindhawkUtils::RemoveWindowSubclassFromAnyThread(hw, CheckBoxSubclassProc); // 3654 — lock still held
InvalidateRect(hw, nullptr, TRUE);
}
2. Teardown hang — the unbounded The pill thread is joined with a deliberately bounded 500 ms wait (37240), and the comment at 37231–37237 spells out the reasoning: if the thread is stuck in a GPU/DXGI call (driver TDR, RDP/virtualized GPU), time out and leak rather than hang. But 150 lines later: std::lock_guard<std::mutex> lk(g_pillDCMutex); // 37389 — unbounded
PillDCompRelease_Locked();The pill worker holds 3. Three raw subclasses are never removed on unload — dangling
Related, same theme (lower confidence): 4. Custom D2D UI is scaled from a single primary-monitor DPI snapshot (
Optional improvements
Minor polish — none of this affects users in normal single-DPI use, so it's your call.
Functionality notes
Non-critical observations about the feature behavior itself.
|
@m417z Addressed everything, all 4 required items plus the optional polish:
One open question on my end: the dui70 32-bit __thiscall concern, I don't have a way to check against a real 32-bit PDB from here, so I added __thiscall as a second symbol-name alternative alongside the existing __stdcall one rather than guessing and replacing it. If you've got a way to confirm which one the real export uses, let me know and I'll clean it up to just the correct one |
Why not? Isn't using Windhawk Symbol Helper on |
Didn't thought of that lol, one second |
@m417z Done and sorry for the multiple commits, I got a littlle confused about how symbol naming was supposed to work. I ran Windhawk Symbol Helper against C:\Windows\SysWOW64\dui70.dll and confirmed DirectUI::Element::PaintBackground really is __thiscall on x86, not __stdcall, fixed it directly instead of hedging with two symbol variants. Should be clean now |
|
Thanks. By the way: // Wh_SetFunctionHook + Wh_ApplyHookOperations must never run from inside a
// hook callback (or Wh_ModInit) -- only from a deferred handler -- per the
// Windhawk modding skill. NavDividerTrackAndGetHwnd runs inside the
// DrawThemeBackground(Ex) hook callback, so it can't call them directly.
// Spawning a one-shot thread here defers the actual call to a separate
// call stack, satisfying that rule while still installing the SetCursor
// hook lazily -- only in processes that actually show a real nav-pane
// divider, instead of unconditionally in Wh_ModInit for every process
// under this mod's @include *.That's not true, a thread is not needed in this case, but not incorrect either, just inefficient. FYI for future updates if you want to improve it. But in this case, why not just hook it in Or maybe it's all AI-generated and doesn't really matter as long as it works :) |
Changelog
Mod authorship
If this pull request introduces a new mod, please complete the section below.
This mod was created by:
Please select the options that best apply. Your selection does not affect the acceptance criteria, but it helps reviewers understand the context of the code and provide relevant feedback.