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
a0715873
Commit
a0715873
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 focus loss style changes.
parent
be01a763
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
4 deletions
+144
-4
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+36
-1
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+36
-1
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+36
-1
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+36
-1
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
a0715873
...
...
@@ -2009,12 +2009,13 @@ static void test_wndproc(void)
static
void
test_window_style
(
void
)
{
LONG
style
,
exstyle
,
tmp
;
LONG
style
,
exstyle
,
tmp
,
expected_style
;
RECT
fullscreen_rect
,
r
;
IDirectDraw
*
ddraw
;
HWND
window
;
HRESULT
hr
;
ULONG
ref
;
BOOL
ret
;
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
0
);
...
...
@@ -2040,6 +2041,20 @@ static void test_window_style(void)
GetClientRect
(
window
,
&
r
);
todo_wine
ok
(
!
EqualRect
(
&
r
,
&
fullscreen_rect
),
"Client rect and window rect are equal.
\n
"
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
todo_wine
ok
(
tmp
==
style
,
"Expected window style %#x, got %#x.
\n
"
,
style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ret
=
SetForegroundWindow
(
window
);
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
/* Windows 7 (but not Vista and XP) show the window when it receives focus. Hide it again,
* the next tests expect this. */
ShowWindow
(
window
,
SW_HIDE
);
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
...
...
@@ -2048,6 +2063,26 @@ static void test_window_style(void)
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ShowWindow
(
window
,
SW_SHOW
);
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
|
WS_MINIMIZE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ref
=
IDirectDraw_Release
(
ddraw
);
ok
(
ref
==
0
,
"The ddraw object was not properly freed: refcount %u.
\n
"
,
ref
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
a0715873
...
...
@@ -2197,12 +2197,13 @@ static void test_wndproc(void)
static
void
test_window_style
(
void
)
{
LONG
style
,
exstyle
,
tmp
;
LONG
style
,
exstyle
,
tmp
,
expected_style
;
RECT
fullscreen_rect
,
r
;
IDirectDraw2
*
ddraw
;
HWND
window
;
HRESULT
hr
;
ULONG
ref
;
BOOL
ret
;
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
0
);
...
...
@@ -2228,6 +2229,20 @@ static void test_window_style(void)
GetClientRect
(
window
,
&
r
);
todo_wine
ok
(
!
EqualRect
(
&
r
,
&
fullscreen_rect
),
"Client rect and window rect are equal.
\n
"
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
todo_wine
ok
(
tmp
==
style
,
"Expected window style %#x, got %#x.
\n
"
,
style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ret
=
SetForegroundWindow
(
window
);
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
/* Windows 7 (but not Vista and XP) show the window when it receives focus. Hide it again,
* the next tests expect this. */
ShowWindow
(
window
,
SW_HIDE
);
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
...
...
@@ -2236,6 +2251,26 @@ static void test_window_style(void)
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ShowWindow
(
window
,
SW_SHOW
);
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
|
WS_MINIMIZE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ref
=
IDirectDraw2_Release
(
ddraw
);
ok
(
ref
==
0
,
"The ddraw object was not properly freed: refcount %u.
\n
"
,
ref
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
a0715873
...
...
@@ -2384,12 +2384,13 @@ static void test_wndproc(void)
static
void
test_window_style
(
void
)
{
LONG
style
,
exstyle
,
tmp
;
LONG
style
,
exstyle
,
tmp
,
expected_style
;
RECT
fullscreen_rect
,
r
;
IDirectDraw4
*
ddraw
;
HWND
window
;
HRESULT
hr
;
ULONG
ref
;
BOOL
ret
;
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
0
);
...
...
@@ -2415,6 +2416,20 @@ static void test_window_style(void)
GetClientRect
(
window
,
&
r
);
todo_wine
ok
(
!
EqualRect
(
&
r
,
&
fullscreen_rect
),
"Client rect and window rect are equal.
\n
"
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
todo_wine
ok
(
tmp
==
style
,
"Expected window style %#x, got %#x.
\n
"
,
style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ret
=
SetForegroundWindow
(
window
);
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
/* Windows 7 (but not Vista and XP) show the window when it receives focus. Hide it again,
* the next tests expect this. */
ShowWindow
(
window
,
SW_HIDE
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
...
...
@@ -2423,6 +2438,26 @@ static void test_window_style(void)
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ShowWindow
(
window
,
SW_SHOW
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
|
WS_MINIMIZE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ref
=
IDirectDraw4_Release
(
ddraw
);
ok
(
ref
==
0
,
"The ddraw object was not properly freed: refcount %u.
\n
"
,
ref
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
a0715873
...
...
@@ -2062,12 +2062,13 @@ static void test_wndproc(void)
static
void
test_window_style
(
void
)
{
LONG
style
,
exstyle
,
tmp
;
LONG
style
,
exstyle
,
tmp
,
expected_style
;
RECT
fullscreen_rect
,
r
;
IDirectDraw7
*
ddraw
;
HWND
window
;
HRESULT
hr
;
ULONG
ref
;
BOOL
ret
;
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
0
);
...
...
@@ -2093,6 +2094,20 @@ static void test_window_style(void)
GetClientRect
(
window
,
&
r
);
todo_wine
ok
(
!
EqualRect
(
&
r
,
&
fullscreen_rect
),
"Client rect and window rect are equal.
\n
"
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
todo_wine
ok
(
tmp
==
style
,
"Expected window style %#x, got %#x.
\n
"
,
style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ret
=
SetForegroundWindow
(
window
);
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
/* Windows 7 (but not Vista and XP) show the window when it receives focus. Hide it again,
* the next tests expect this. */
ShowWindow
(
window
,
SW_HIDE
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
...
...
@@ -2101,6 +2116,26 @@ static void test_window_style(void)
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
todo_wine
ok
(
tmp
==
exstyle
,
"Expected window extended style %#x, got %#x.
\n
"
,
exstyle
,
tmp
);
ShowWindow
(
window
,
SW_SHOW
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"SetCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
tmp
=
GetWindowLongA
(
window
,
GWL_STYLE
);
expected_style
=
style
|
WS_VISIBLE
|
WS_MINIMIZE
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
tmp
=
GetWindowLongA
(
window
,
GWL_EXSTYLE
);
expected_style
=
exstyle
|
WS_EX_TOPMOST
;
todo_wine
ok
(
tmp
==
expected_style
,
"Expected window extended style %#x, got %#x.
\n
"
,
expected_style
,
tmp
);
ref
=
IDirectDraw7_Release
(
ddraw
);
ok
(
ref
==
0
,
"The ddraw object was not properly freed: refcount %u.
\n
"
,
ref
);
...
...
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