From: Stefan Dösinger stefan@codeweavers.com
--- dlls/d3d9/tests/d3d9ex.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index bde3dc62ef6..17161b4bfec 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3015,13 +3015,37 @@ static void test_wndproc(void) expect_messages->message, expect_messages->window, i); ok(!windowposchanged_received, "Received WM_WINDOWPOSCHANGED but did not expect it, i=%u.\n", i); expect_messages = NULL; - flush_events();
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); ok(ret, "Failed to get display mode.\n"); ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth, "Got unexpected width %lu.\n", devmode.dmPelsWidth); ok(devmode.dmPelsHeight == registry_mode.dmPelsHeight, "Got unexpected height %lu.\n", devmode.dmPelsHeight);
+ flush_events(); + + /* Openbox accidentally sets focus to the device window, causing WM_ACTIVATEAPP to be sent to the focus + * window. d3d9ex then restores the screen mode. This only happens in the D3DCREATE_NOWINDOWCHANGES case. + * + * This appears to be a race condition - it goes away if openbox is started with --sync. d3d9:device and + * d3d8:device are affected too, but because in their case d3d does not automatically restore the screen + * mode (it needs a call to device::Reset), the EnumDisplaySettings check succeeds regardless. + * + * Note that this is not a case of focus follows mouse. This happens when Openbox is configured to use + * click to focus too. */ + if (GetForegroundWindow() == device_window) + { + skip("WM set focus to the device window, not checking screen mode.\n"); + } + else + { + ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode); + ok(ret, "Failed to get display mode.\n"); + ok(devmode.dmPelsWidth == registry_mode.dmPelsWidth, + "Got unexpected width %lu.\n", devmode.dmPelsWidth); + ok(devmode.dmPelsHeight == registry_mode.dmPelsHeight, + "Got unexpected height %lu.\n", devmode.dmPelsHeight); + } + /* SW_SHOWMINNOACTIVE is needed to make FVWM happy. SW_SHOWNOACTIVATE is needed to make windows * send SIZE_RESTORED after ShowWindow(SW_SHOWMINNOACTIVE). */ ShowWindow(focus_window, SW_SHOWNOACTIVATE);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
2 TestBot errors prevented a full analysis of your patch. If the test caused the operating system (e.g. Windows) to crash or reboot you will probably have to modify it to avoid that. Other issues should be reported to the TestBot administrators.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=151749
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/d3d9/tests/d3d9ex.c:3015 Task: Patch failed to apply
=== debian11 (build log) ===
WineRunWineTest.pl:error: Could not send 'patch.diff' to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) WineRunWineTest.pl:error: BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) WineRunWineTest.pl:error: Giving up after 3 run(s)
=== debian11b (build log) ===
WineRunWineTest.pl:error: Could not send 'patch.diff' to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) WineRunWineTest.pl:error: BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) WineRunWineTest.pl:error: Giving up after 3 run(s)
This merge request was approved by Jan Sikorski.
There's the risk that we break the code in a way that imitates OpenBox behavior and don't notice it. I would prefer a specific WM & version check, but we don't have a way of doing that; this seems good enough.
This merge request was approved by Zebediah Figura.