22 Mar
2023
22 Mar
'23
2:54 a.m.
wine-gecko started calling dwmapi since dwmapi stubs were improved between Wine 7 and 8. It loops in gfxWindowsPlatform.cpp:VBlankLoop() in a tight loop now because DwmFlush() is a no-op. Besides unneeded CPU load that also causes hangs on exit in Final Fantasy XIV launcher. The launcher can't get WM_QUIT message in its message loop because it constantly gets the messages queued from VBlankLoop() while processing previous "nsAppShell:EventID" message. DwmFlush() is supposed to wait until next VBlank. My supplied test only tests that the wait is not alertable, but I also ad-hoc tested that the delay time introduced by DmwFlush() is between 0 and display refresh frequency. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2463