[PATCH 1/8] ddraw/tests: Look for more messages when losing focus.
Stefan Dösinger
stefan at codeweavers.com
Sat Oct 13 18:13:50 CDT 2018
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
---
The only new bit of information here is the WM_KILLFOCUS message. The
rest is already covered by the focus loss test, but it is (a) helpful to
make the two window changes explicit and (b) it will serve as a place to
check the state of the DirectDraw object during the focus loss sequence.
---
dlls/ddraw/tests/ddraw1.c | 6 +++++-
dlls/ddraw/tests/ddraw2.c | 6 +++++-
dlls/ddraw/tests/ddraw4.c | 6 +++++-
dlls/ddraw/tests/ddraw7.c | 6 +++++-
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index ee4fa5bfaab..aad7bbff1f4 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -2447,8 +2447,12 @@ static void test_coop_level_mode_set(void)
static const struct message exclusive_focus_loss_messages[] =
{
{WM_ACTIVATE, TRUE, WA_INACTIVE},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window resize due to mode change. */
+ {WM_WINDOWPOSCHANGED, FALSE, 0},
+ {WM_SIZE, TRUE, SIZE_RESTORED}, /* Generated by DefWindowProc. */
{WM_DISPLAYCHANGE, FALSE, 0},
- {WM_WINDOWPOSCHANGING, FALSE, 0},
+ {WM_KILLFOCUS, FALSE, 0},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window minimized. */
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
* produce the same result in Wine yet. Ignore the difference for now.
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 9394705330a..29c3c845cb1 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -2572,8 +2572,12 @@ static void test_coop_level_mode_set(void)
static const struct message exclusive_focus_loss_messages[] =
{
{WM_ACTIVATE, TRUE, WA_INACTIVE},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window resize due to mode change. */
+ {WM_WINDOWPOSCHANGED, FALSE, 0},
+ {WM_SIZE, TRUE, SIZE_RESTORED}, /* Generated by DefWindowProc. */
{WM_DISPLAYCHANGE, FALSE, 0},
- {WM_WINDOWPOSCHANGING, FALSE, 0},
+ {WM_KILLFOCUS, FALSE, 0},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window minimized. */
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
* produce the same result in Wine yet. Ignore the difference for now.
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 6a3630a2c0e..7cf61cea911 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -2713,8 +2713,12 @@ static void test_coop_level_mode_set(void)
static const struct message exclusive_focus_loss_messages[] =
{
{WM_ACTIVATE, TRUE, WA_INACTIVE},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window resize due to mode change. */
+ {WM_WINDOWPOSCHANGED, FALSE, 0},
+ {WM_SIZE, TRUE, SIZE_RESTORED}, /* Generated by DefWindowProc. */
{WM_DISPLAYCHANGE, FALSE, 0},
- {WM_WINDOWPOSCHANGING, FALSE, 0},
+ {WM_KILLFOCUS, FALSE, 0},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window minimized. */
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
* produce the same result in Wine yet. Ignore the difference for now.
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 5bb2951cee7..6ae4207b34b 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -2442,8 +2442,12 @@ static void test_coop_level_mode_set(void)
static const struct message exclusive_focus_loss_messages[] =
{
{WM_ACTIVATE, TRUE, WA_INACTIVE},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window resize due to mode change. */
+ {WM_WINDOWPOSCHANGED, FALSE, 0},
+ {WM_SIZE, TRUE, SIZE_RESTORED}, /* Generated by DefWindowProc. */
{WM_DISPLAYCHANGE, FALSE, 0},
- {WM_WINDOWPOSCHANGING, FALSE, 0},
+ {WM_KILLFOCUS, FALSE, 0},
+ {WM_WINDOWPOSCHANGING, FALSE, 0}, /* Window minimized. */
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
* produce the same result in Wine yet. Ignore the difference for now.
--
2.18.1
More information about the wine-devel
mailing list