Zebediah Figura (@zfigura) commented about dlls/ddraw/tests/ddraw1.c:
- /* Remove WS_VISIBLE and WS_EX_TOPMOST */
- tmp = GetWindowLongA(window, GWL_STYLE);
- ok(tmp & WS_VISIBLE, "Expected WS_VISIBLE.\n");
- tmp = GetWindowLongA(window, GWL_EXSTYLE);
- ok(tmp & WS_EX_TOPMOST, "Expected WS_EX_TOPMOST.\n");
- ret = ShowWindow(window, SW_HIDE);
- ok(ret, "ShowWindow failed, error %#lx.\n", GetLastError());
- ret = SetWindowPos(window, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- ok(ret, "SetWindowPos failed, error %#lx.\n", GetLastError());
- tmp = GetWindowLongA(window, GWL_STYLE);
- ok(!(tmp & WS_VISIBLE), "Got unexpected WS_VISIBLE.\n");
- tmp = GetWindowLongA(window, GWL_EXSTYLE);
- ok(!(tmp & WS_EX_TOPMOST), "Got unexpected WS_EX_TOPMOST.\n");
- Sleep(1500);
- flush_events();
If the timer is exactly 1.5 seconds then I'd imagine the sleep should be a bit longer, to avoid races?