Fences Smooth Page Swipe
Makes Stardock Fences 7 desktop page swipes smooth: frames timed to the monitor refresh, fences glide instead of repainting every step
Author: Helgi
Makes desktop page swipes in
Stardock Fences 7 smooth,
especially on high refresh rate monitors.
Fences draws the swipe animation with GDI on the CPU, and a few details of how
it does that make it stutter:
- Dragging: on every frame Fences moves each fence window, makes it repaint
right away and waits for it (about 13 ms per fence). With a few fences on the
page, dragging runs at about 15 fps.
- Slide after letting go: a separate thread animates the slide, but every
step still repaints every fence, so the fences fall behind the sliding page.
- Timing: the animation uses a 10 ms timer that is not in step with the
monitor, so frames stay on screen for uneven times.
- Frame clear: every frame copies the background pixel by pixel in a slow
loop.
What the mod changes:
- While the page moves, fences change position without repainting (their
content stays the same) and repaint once when the page stops.
- Animation frames are timed to the monitor refresh. When frames are fast
enough, the slide runs one step per refresh and still takes as long as it
does without the mod (on a high refresh rate monitor that means more,
smaller steps).
- Mouse moves are ignored while the page slides, so a flick does not hold up
the fences.
- The frame clear is a single memory copy.
On a 165 Hz monitor a drag frame went from about 60 ms to about 7 ms, and the
slide runs at the full refresh rate.
Compatibility
- Made for and tested with Fences 7.0.0.9 on Windows 11 (64-bit).
- The mod finds the code it changes with byte patterns and checks it before
changing anything. If a Fences update changes that code, the affected part of
the mod turns itself off and Fences works as it does without the mod. The
mod's log shows what was found.
- With monitors of different refresh rates, the animation is timed to the main
display.
- Fences 5 and 6 are not supported.
This mod is not affiliated with Stardock.