user/tests: Flush events before running the keyboard event test.
diff --git a/dlls/user/tests/win.c b/dlls/user/tests/win.c
index 326a279..a4ecbe5 100644
--- a/dlls/user/tests/win.c
+++ b/dlls/user/tests/win.c
@@ -2314,6 +2314,7 @@
 
     ShowWindow(hwnd, SW_SHOW);
     UpdateWindow(hwnd);
+    flush_events();
 
     ok(GetActiveWindow() == hwnd, "wrong active window %p\n", GetActiveWindow());