https://bugs.winehq.org/show_bug.cgi?id=39516
--- Comment #5 from Piotr Caban piotr.caban@gmail.com --- Created attachment 52702 --> https://bugs.winehq.org/attachment.cgi?id=52702 flush events after SetForegroundWindow call
This patch should fix the test failures, could you please give it a try?