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
a9e0ece6
Commit
a9e0ece6
authored
Nov 18, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Test mode changes on focus loss and restore.
parent
b3090141
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
8 deletions
+70
-8
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+16
-2
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+18
-2
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+18
-2
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+18
-2
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
a9e0ece6
...
...
@@ -2207,7 +2207,7 @@ static void test_coop_level_mode_set(void)
static
const
struct
message
exclusive_focus_loss_messages
[]
=
{
{
WM_ACTIVATE
,
TRUE
,
WA_INACTIVE
},
/*{WM_DISPLAYCHANGE, FALSE, 0}, Not yet implemented on Wine. */
{
WM_DISPLAYCHANGE
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
...
...
@@ -2358,9 +2358,20 @@ static void test_coop_level_mode_set(void)
expect_messages
=
exclusive_focus_loss_messages
;
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
todo_wine
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
registry_mode
.
dmPelsWidth
&&
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
ShowWindow
(
window
,
SW_RESTORE
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
param
.
ddraw_width
&&
devmode
.
dmPelsHeight
==
param
.
ddraw_height
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
/* Normally the primary should be restored here. Unfortunately this causes the
...
...
@@ -2459,6 +2470,9 @@ static void test_coop_level_mode_set(void)
screen_size
.
cx
=
0
;
screen_size
.
cy
=
0
;
devmode
.
dmFields
=
DM_PELSWIDTH
|
DM_PELSHEIGHT
;
devmode
.
dmPelsWidth
=
param
.
user32_width
;
devmode
.
dmPelsHeight
=
param
.
user32_height
;
change_ret
=
ChangeDisplaySettingsW
(
&
devmode
,
CDS_FULLSCREEN
);
ok
(
change_ret
==
DISP_CHANGE_SUCCESSFUL
,
"Failed to change display mode, ret %#x.
\n
"
,
change_ret
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
a9e0ece6
...
...
@@ -2406,7 +2406,7 @@ static void test_coop_level_mode_set(void)
static
const
struct
message
exclusive_focus_loss_messages
[]
=
{
{
WM_ACTIVATE
,
TRUE
,
WA_INACTIVE
},
/*{WM_DISPLAYCHANGE, FALSE, 0}, Not yet implemented on Wine. */
{
WM_DISPLAYCHANGE
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
...
...
@@ -2562,9 +2562,22 @@ static void test_coop_level_mode_set(void)
expect_messages
=
exclusive_focus_loss_messages
;
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
todo_wine
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
memset
(
&
devmode
,
0
,
sizeof
(
devmode
));
devmode
.
dmSize
=
sizeof
(
devmode
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
registry_mode
.
dmPelsWidth
&&
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
ShowWindow
(
window
,
SW_RESTORE
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
param
.
ddraw_width
&&
devmode
.
dmPelsHeight
==
param
.
ddraw_height
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
/* Normally the primary should be restored here. Unfortunately this causes the
...
...
@@ -2663,6 +2676,9 @@ static void test_coop_level_mode_set(void)
screen_size
.
cx
=
0
;
screen_size
.
cy
=
0
;
devmode
.
dmFields
=
DM_PELSWIDTH
|
DM_PELSHEIGHT
;
devmode
.
dmPelsWidth
=
param
.
user32_width
;
devmode
.
dmPelsHeight
=
param
.
user32_height
;
change_ret
=
ChangeDisplaySettingsW
(
&
devmode
,
CDS_FULLSCREEN
);
ok
(
change_ret
==
DISP_CHANGE_SUCCESSFUL
,
"Failed to change display mode, ret %#x.
\n
"
,
change_ret
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
a9e0ece6
...
...
@@ -2593,7 +2593,7 @@ static void test_coop_level_mode_set(void)
static
const
struct
message
exclusive_focus_loss_messages
[]
=
{
{
WM_ACTIVATE
,
TRUE
,
WA_INACTIVE
},
/*{WM_DISPLAYCHANGE, FALSE, 0}, Not yet implemented on Wine. */
{
WM_DISPLAYCHANGE
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
...
...
@@ -2749,9 +2749,22 @@ static void test_coop_level_mode_set(void)
expect_messages
=
exclusive_focus_loss_messages
;
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
todo_wine
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
memset
(
&
devmode
,
0
,
sizeof
(
devmode
));
devmode
.
dmSize
=
sizeof
(
devmode
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
registry_mode
.
dmPelsWidth
&&
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
ShowWindow
(
window
,
SW_RESTORE
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
param
.
ddraw_width
&&
devmode
.
dmPelsHeight
==
param
.
ddraw_height
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
/* Normally the primary should be restored here. Unfortunately this causes the
...
...
@@ -2850,6 +2863,9 @@ static void test_coop_level_mode_set(void)
screen_size
.
cx
=
0
;
screen_size
.
cy
=
0
;
devmode
.
dmFields
=
DM_PELSWIDTH
|
DM_PELSHEIGHT
;
devmode
.
dmPelsWidth
=
param
.
user32_width
;
devmode
.
dmPelsHeight
=
param
.
user32_height
;
change_ret
=
ChangeDisplaySettingsW
(
&
devmode
,
CDS_FULLSCREEN
);
ok
(
change_ret
==
DISP_CHANGE_SUCCESSFUL
,
"Failed to change display mode, ret %#x.
\n
"
,
change_ret
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
a9e0ece6
...
...
@@ -2270,7 +2270,7 @@ static void test_coop_level_mode_set(void)
static
const
struct
message
exclusive_focus_loss_messages
[]
=
{
{
WM_ACTIVATE
,
TRUE
,
WA_INACTIVE
},
/*{WM_DISPLAYCHANGE, FALSE, 0}, Not yet implemented on Wine. */
{
WM_DISPLAYCHANGE
,
FALSE
,
0
},
{
WM_WINDOWPOSCHANGING
,
FALSE
,
0
},
/* Like d3d8 and d3d9 ddraw seems to use SW_SHOWMINIMIZED instead of
* SW_MINIMIZED, causing a recursive window activation that does not
...
...
@@ -2426,9 +2426,22 @@ static void test_coop_level_mode_set(void)
expect_messages
=
exclusive_focus_loss_messages
;
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
todo_wine
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
memset
(
&
devmode
,
0
,
sizeof
(
devmode
));
devmode
.
dmSize
=
sizeof
(
devmode
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
registry_mode
.
dmPelsWidth
&&
devmode
.
dmPelsHeight
==
registry_mode
.
dmPelsHeight
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
ShowWindow
(
window
,
SW_RESTORE
);
ret
=
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
ok
(
ret
,
"Failed to get display mode.
\n
"
);
todo_wine
ok
(
devmode
.
dmPelsWidth
==
param
.
ddraw_width
&&
devmode
.
dmPelsHeight
==
param
.
ddraw_height
,
"Got unexpect screen size %ux%u.
\n
"
,
devmode
.
dmPelsWidth
,
devmode
.
dmPelsHeight
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
/* Normally the primary should be restored here. Unfortunately this causes the
...
...
@@ -2527,6 +2540,9 @@ static void test_coop_level_mode_set(void)
screen_size
.
cx
=
0
;
screen_size
.
cy
=
0
;
devmode
.
dmFields
=
DM_PELSWIDTH
|
DM_PELSHEIGHT
;
devmode
.
dmPelsWidth
=
param
.
user32_width
;
devmode
.
dmPelsHeight
=
param
.
user32_height
;
change_ret
=
ChangeDisplaySettingsW
(
&
devmode
,
CDS_FULLSCREEN
);
ok
(
change_ret
==
DISP_CHANGE_SUCCESSFUL
,
"Failed to change display mode, ret %#x.
\n
"
,
change_ret
);
...
...
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