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
857d8f36
Commit
857d8f36
authored
Jul 02, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Fix some test failures with the focus messages.
parent
f0e21b0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
device.c
dlls/d3d8/tests/device.c
+20
-3
No files found.
dlls/d3d8/tests/device.c
View file @
857d8f36
...
...
@@ -46,6 +46,22 @@ static int get_refcount(IUnknown *object)
return
IUnknown_Release
(
object
);
}
/* try to make sure pending X events have been processed before continuing */
static
void
flush_events
(
void
)
{
MSG
msg
;
int
diff
=
200
;
int
min_timeout
=
100
;
DWORD
time
=
GetTickCount
()
+
diff
;
while
(
diff
>
0
)
{
if
(
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
min_timeout
,
QS_ALLINPUT
)
==
WAIT_TIMEOUT
)
break
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
diff
=
time
-
GetTickCount
();
}
}
static
IDirect3DDevice8
*
create_device
(
IDirect3D8
*
d3d8
,
HWND
device_window
,
HWND
focus_window
,
BOOL
windowed
)
{
D3DPRESENT_PARAMETERS
present_parameters
=
{
0
};
...
...
@@ -1505,7 +1521,8 @@ static LRESULT CALLBACK test_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM
{
if
(
filter_messages
&&
filter_messages
==
hwnd
)
{
ok
(
message
==
WM_DISPLAYCHANGE
,
"Received unexpected message %#x for window %p.
\n
"
,
message
,
hwnd
);
if
(
message
!=
WM_DISPLAYCHANGE
&&
message
!=
WM_IME_NOTIFY
)
todo_wine
ok
(
0
,
"Received unexpected message %#x for window %p.
\n
"
,
message
,
hwnd
);
}
if
(
expect_message
.
window
==
hwnd
&&
expect_message
.
message
==
message
)
expect_message
.
message
=
0
;
...
...
@@ -1555,7 +1572,6 @@ static void test_wndproc(void)
LONG_PTR
proc
;
ULONG
ref
;
DWORD
res
,
tid
;
MSG
msg
;
if
(
!
(
d3d8
=
pDirect3DCreate8
(
D3D_SDK_VERSION
)))
{
...
...
@@ -1601,7 +1617,7 @@ static void test_wndproc(void)
expect_message
.
window
=
focus_window
;
expect_message
.
message
=
WM_SETFOCUS
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
flush_events
(
);
device
=
create_device
(
d3d8
,
device_window
,
focus_window
,
FALSE
);
if
(
!
device
)
...
...
@@ -1620,6 +1636,7 @@ static void test_wndproc(void)
ok
(
tmp
==
focus_window
,
"Expected foreground window %p, got %p.
\n
"
,
focus_window
,
tmp
);
}
SetForegroundWindow
(
focus_window
);
flush_events
();
filter_messages
=
focus_window
;
...
...
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