On each re/init, query the active monitor refresh rate via
DwmGetCompositionTimingInfo. If the client requested framerate exceeds
the host monitor refresh, automatically disable DwmFlush.
This avoids the problem by which DwmFlush would constrain the client
FPS if the host monitor runs at a lower refresh rate, thus allowing
the feature to be enabled by default.
If there are other issues caused by DwmFlush for certain systems,
it can still be disabled via configuration.
Invoke DwmFlush() before acquiring the next frame to alleviate visual stutter
during mouse movement at the cost of constraining the capture rate to the host's
monitor refresh.
Disabled by default; enable via "dwmflush" boolean configuration parameter.
These were causing unusual behaviour (select dialogs displaying a blank label
when a value should be selected, and values randomly setting themselves to
undefined when switching tabs).