Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
262b9cc6
Commit
262b9cc6
authored
Dec 04, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Test WM_SYSCOMMAND handling.
parent
bd91c559
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
0 deletions
+168
-0
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+42
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+42
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+42
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+42
-0
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
262b9cc6
...
...
@@ -2233,6 +2233,30 @@ static void test_coop_level_mode_set(void)
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
/* DefWindowProc. */
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_restore_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_RESTORE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_minimize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MINIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MINIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_maximize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MAXIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MAXIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
normal_messages
[]
=
{
...
...
@@ -2400,6 +2424,24 @@ static void test_coop_level_mode_set(void)
* testbot. Another Restore call would presumably avoid the crash, but it also moots
* the point of the GetSurfaceDesc call. */
expect_messages
=
sc_minimize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MINIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_restore_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_RESTORE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_maximize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MAXIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
expect_messages
=
exclusive_messages
;
screen_size
.
cx
=
0
;
...
...
dlls/ddraw/tests/ddraw2.c
View file @
262b9cc6
...
...
@@ -2432,6 +2432,30 @@ static void test_coop_level_mode_set(void)
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
/* DefWindowProc. */
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_restore_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_RESTORE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_minimize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MINIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MINIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_maximize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MAXIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MAXIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
normal_messages
[]
=
{
...
...
@@ -2606,6 +2630,24 @@ static void test_coop_level_mode_set(void)
* testbot. Another Restore call would presumably avoid the crash, but it also moots
* the point of the GetSurfaceDesc call. */
expect_messages
=
sc_minimize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MINIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_restore_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_RESTORE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_maximize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MAXIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
expect_messages
=
exclusive_messages
;
screen_size
.
cx
=
0
;
...
...
dlls/ddraw/tests/ddraw4.c
View file @
262b9cc6
...
...
@@ -2619,6 +2619,30 @@ static void test_coop_level_mode_set(void)
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
/* DefWindowProc. */
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_restore_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_RESTORE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_minimize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MINIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MINIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_maximize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MAXIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MAXIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
normal_messages
[]
=
{
...
...
@@ -2793,6 +2817,24 @@ static void test_coop_level_mode_set(void)
* testbot. Another Restore call would presumably avoid the crash, but it also moots
* the point of the GetSurfaceDesc call. */
expect_messages
=
sc_minimize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MINIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_restore_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_RESTORE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_maximize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MAXIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
expect_messages
=
exclusive_messages
;
screen_size
.
cx
=
0
;
...
...
dlls/ddraw/tests/ddraw7.c
View file @
262b9cc6
...
...
@@ -2296,6 +2296,30 @@ static void test_coop_level_mode_set(void)
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
/* DefWindowProc. */
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_restore_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_RESTORE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_RESTORED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_minimize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MINIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MINIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
sc_maximize_messages
[]
=
{
{
WM_SYSCOMMAND
,
TRUE
,
SC_MAXIMIZE
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGED
,
FALSE
,
0
},
{
WM_SIZE
,
TRUE
,
SIZE_MAXIMIZED
},
{
0
,
FALSE
,
0
},
};
static
const
struct
message
normal_messages
[]
=
{
...
...
@@ -2470,6 +2494,24 @@ static void test_coop_level_mode_set(void)
* testbot. Another Restore call would presumably avoid the crash, but it also moots
* the point of the GetSurfaceDesc call. */
expect_messages
=
sc_minimize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MINIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_restore_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_RESTORE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
sc_maximize_messages
;
SendMessageA
(
window
,
WM_SYSCOMMAND
,
SC_MAXIMIZE
,
0
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
expect_messages
=
exclusive_messages
;
screen_size
.
cx
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment