From: Rémi Bernon rbernon@codeweavers.com
This test appear to be sensitive to pending ConfigureNotify events which will otherwise overwrite window resizes triggered by cooperative level and display mode changes. --- dlls/ddraw/tests/ddraw2.c | 2 ++ dlls/ddraw/tests/ddraw4.c | 2 ++ dlls/ddraw/tests/ddraw7.c | 2 ++ 3 files changed, 6 insertions(+)
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 4841a4f0b8a..48a49815c58 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -3784,6 +3784,8 @@ static void test_coop_level_mode_set(void) hr = IDirectDraw2_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
+ flush_events(); /* flush any pending window resize X11 event */ + /* If the window is changed at the same time, messages are sent to the new window. */ hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 00b5d27f55c..8abd9cd44fd 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -4020,6 +4020,8 @@ static void test_coop_level_mode_set(void) hr = IDirectDraw4_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
+ flush_events(); /* flush any pending window resize X11 event */ + /* If the window is changed at the same time, messages are sent to the new window. */ hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 39be7a1b1e8..3e03d3e4dd6 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -3792,6 +3792,8 @@ static void test_coop_level_mode_set(void) hr = IDirectDraw7_RestoreDisplayMode(ddraw); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#lx.\n", hr);
+ flush_events(); /* flush any pending window resize X11 event */ + /* If the window is changed at the same time, messages are sent to the new window. */ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#lx.\n", hr);