=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3d8/tests: Work around focus-follows-mouse test failures.
Alexandre Julliard
julliard at winehq.org
Thu Dec 21 16:37:27 CST 2017
Module: wine
Branch: master
Commit: 724f68c4553c1e88d065bc97be53e4c437be2511
URL: https://source.winehq.org/git/wine.git/?a=commit;h=724f68c4553c1e88d065bc97be53e4c437be2511
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Mon Dec 18 21:39:29 2017 +0100
d3d8/tests: Work around focus-follows-mouse test failures.
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d8/tests/device.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 915ab8b..8743a24 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -2888,7 +2888,11 @@ static void test_wndproc(void)
hr = reset_device(device, &device_desc);
ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr);
- ShowWindow(device_window, SW_HIDE);
+ /* Remove the WS_VISIBLE flag to test hidden windows. This is enough to trigger d3d's hidden
+ * window codepath, but does not actually hide the window without a SetWindowPos(SWP_FRAMECHANGED)
+ * call. This way we avoid focus changes and random failures on focus follows mouse WMs. */
+ device_style = GetWindowLongA(device_window, GWL_STYLE);
+ SetWindowLongA(device_window, GWL_STYLE, device_style & ~WS_VISIBLE);
flush_events();
expect_messages = focus_loss_messages_hidden;
More information about the wine-cvs
mailing list