From: Stefan Dösinger stefan@codeweavers.com
kwin resizes hidden windows most of the time. I see the existing flaky markers triggered on Windows 11 occasionally.
---
This makes the !WS_VISIBLE tests fairly weak since we ignore the random failures we get on Windows and Wine.
According to https://marc.info/?l=wine-patches&m=141642450913299&w=2 , the mail to wine-patches behind commit f4d520d6e2, which added this test, those tests intended to cover some differences between d3d9 and d3d9ex, not a specific game behavior. I vaguely remember that I did run into something that needed this behavior, but I can't find out any more what this might have been. The memory of those 9 year old patches is getting blurry. --- dlls/d3d9/tests/d3d9ex.c | 9 ++++++++- dlls/d3d9/tests/device.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 17161b4bfec..b79481fafbf 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3013,7 +3013,11 @@ static void test_wndproc(void) SetForegroundWindow(GetDesktopWindow()); ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n", expect_messages->message, expect_messages->window, i); + + /* kwin sometimes resizes hidden windows. */ + flaky ok(!windowposchanged_received, "Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.\n", i); + expect_messages = NULL;
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); @@ -3121,8 +3125,11 @@ static void test_wndproc(void) flaky_wine ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n", expect_messages->message, expect_messages->window, i); - flaky_if(i == 0 || i == 1) + + /* kwin and Win8+ sometimes resize hidden windows. */ + flaky ok(!windowposchanged_received, "Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.\n", i); + expect_messages = NULL;
/* The window is iconic even though no message was sent. */ diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index c972e97f572..4e0ca728c07 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4273,6 +4273,7 @@ static void test_wndproc(void) SetForegroundWindow(GetDesktopWindow()); ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n", expect_messages->message, expect_messages->window, i); + flaky ok(!windowposchanged_received, "Received WM_WINDOWPOSCHANGED but did not expect it.\n"); expect_messages = NULL; flush_events(); @@ -4363,8 +4364,11 @@ static void test_wndproc(void) SetForegroundWindow(GetDesktopWindow()); ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n", expect_messages->message, expect_messages->window, i); - flaky_if(i == 0) + + /* kwin and Win8+ sometimes resize hidden windows. */ + flaky ok(!windowposchanged_received, "Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.\n", i); + expect_messages = NULL;
/* The window is iconic even though no message was sent. */