How can I know which window emits the Compositor tick event?

峻魁 张 20 Reputation points
2024-03-12T07:52:29.34+00:00

I have a program that can open multiple windows, and currently, I use DCompositionWaitForCompositorClock to achieve vertical sync refresh rate. However, how can I make multiple windows synchronize at different refresh rates on different monitors? For example, I have two monitors, the primary monitor running at 60Hz and the secondary monitor running at 120Hz. It seems that DCompositionWaitForCompositorClock only emits tick events when my primary monitor refreshes. Is there a function similar to DCompositionWaitForCompositorClock that I can use to obtain tick events for the corresponding monitor on the secondary display?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,412 questions
{count} votes