Zhiyi Zhang zzhang@codeweavers.com writes:
@@ -7693,6 +7695,30 @@ static void test_ShowWindow(void)
flush_events(TRUE);
- /* Test SW_SHOWMINIMIZED shouldn't restore windows from minimized state */
- SetWindowPos(hwndMain, 0, 100, 100, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
- hwnd = CreateWindowA("static", "test", WS_POPUP, 100, 100, 200, 200, NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowA failed, error %d.\n", GetLastError());
- ShowWindow(hwnd, SW_SHOWMINIMIZED);
- flush_events(TRUE);
- hdc = GetDC(0);
- color = GetPixel(hdc, 150, 150);
- /* Desktop pixels may take a while to update */
- while (color != 0xffffff && timeout < 1000)
- {
Sleep(100);
timeout += 100;
color = GetPixel(hdc, 150, 150);
- }
Please try to find a better way than reading pixels from the root window, that will never work reliably.