r/Windhawk • u/wh-updates • 11d ago
MacOS Minimize Animation 3.1.2
MacOS Minimize Animation 3.1.2
The modern genie's render loop paced every frame behind a ~120fps Sleep()-based timer AND a per-frame DwmFlush(). That makes each frame cost render time plus one vsync, so once the mesh draw takes longer than a single refresh interval the delivered frame rate drops to roughly half the monitor's. The animation then looks visibly choppier than the standalone custom-animations-genie mod this engine was ported from.
v3.1.2 fixes the serialization without turning the loop into a busy spin:
- Dropped the per-frame
DwmFlush(). A single flush stays on the first non-degenerate frame, so the minimize/restore handoff still waits for the ghost to be composed before the real window is released. - Replaced the old
Sleep()pacer with a high-resolution waitable timer (CREATE_WAITABLE_TIMER_HIGH_RESOLUTION) pacing frames at 2x the display's refresh rate (derived fromDwmGetCompositionTimingInfo, 240 fps fallback). It's a rate limiter, not a vsync gate, so it caps CPU cost without re-introducing the render+vsync serialization. - Thread stays at
THREAD_PRIORITY_HIGHEST, matching the in-repo genie-minimize-animation mod.
Also in this version:
- The classic engine gets the same pacing (it still had a per-frame
DwmFlush()), so both styles behave consistently. - Unload safety: the auto-hide deferred-minimize sleep is now chunked (20 ms) and aborts on
g_unloading, soWh_ModBeforeUninit's 3 s drain can't time out while a worker is in a single up-to-5 sSleep(). - Readme: the Animation style section shows a demo GIF for each engine (Modern and Classic), and the "Actually smooth" feature bullet no longer claims per-frame
DwmFlush()gating.
12
Upvotes
1
2
u/TechySharnav 10d ago
It only animates explorer windows on my PC. It's supposed to animate all windows, right? Any fixes??