Stefan Dösinger (@stefan) commented about dlls/d3d9/tests/device.c:
} filter_messages = NULL; SetForegroundWindow(focus_window); /* For KDE. */
flush_events();
I find it suspicious that removing a flush fixes anything, but I don't have a better solution and my suspicions shouldn't hinder Gitlab CI...