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
1b6533bc
Commit
1b6533bc
authored
Aug 20, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use flush_events more consistently in the message tests.
parent
7378fac5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
18 deletions
+12
-18
msg.c
dlls/user32/tests/msg.c
+0
-0
win.c
dlls/user32/tests/win.c
+12
-18
No files found.
dlls/user32/tests/msg.c
View file @
1b6533bc
This diff is collapsed.
Click to expand it.
dlls/user32/tests/win.c
View file @
1b6533bc
...
...
@@ -66,7 +66,7 @@ static void flush_events(void)
while
(
diff
>
0
)
{
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
diff
,
QS_ALLINPUT
)
;
if
(
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
min
(
10
,
diff
),
QS_ALLINPUT
)
==
WAIT_TIMEOUT
)
break
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
diff
=
time
-
GetTickCount
();
}
...
...
@@ -2421,7 +2421,7 @@ static void test_keyboard_input(HWND hwnd)
SetFocus
(
hwnd
);
ok
(
GetFocus
()
==
hwnd
,
"wrong focus window %p
\n
"
,
GetFocus
());
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
PostMessageA
(
hwnd
,
WM_KEYDOWN
,
0
,
0
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
...
...
@@ -2448,7 +2448,7 @@ static void test_keyboard_input(HWND hwnd)
SetFocus
(
0
);
ok
(
GetFocus
()
==
0
,
"wrong focus window %p
\n
"
,
GetFocus
());
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
flush_events
(
);
PostMessageA
(
hwnd
,
WM_KEYDOWN
,
0
,
0
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
...
...
@@ -2631,7 +2631,7 @@ static void test_mouse_input(HWND hwnd)
TEST_MOUSEACTIVATE
(
HTHELP
,
MA_ACTIVATE
);
/* Clear any messages left behind by WM_MOUSEACTIVATE tests */
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
DestroyWindow
(
popup
);
}
...
...
@@ -2877,7 +2877,6 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
STYLESTRUCT
ss
;
HWND
hwnd
;
HWND
hwndParent
=
NULL
;
MSG
msg
;
ss
.
styleNew
=
dwStyleIn
;
ss
.
styleOld
=
dwExStyleIn
;
...
...
@@ -2892,11 +2891,7 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
dwStyleIn
,
0
,
0
,
0
,
0
,
hwndParent
,
NULL
,
NULL
,
&
ss
);
assert
(
hwnd
);
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
flush_events
();
dwActualStyle
=
GetWindowLong
(
hwnd
,
GWL_STYLE
);
dwActualExStyle
=
GetWindowLong
(
hwnd
,
GWL_EXSTYLE
);
...
...
@@ -3454,7 +3449,6 @@ static void test_csparentdc(void)
{
WNDCLASSA
clsMain
,
cls
;
HWND
hwndMain
,
hwnd1
,
hwnd2
;
MSG
msg
;
RECT
rc
;
struct
parentdc_test
test_answer
;
...
...
@@ -3560,43 +3554,43 @@ static void test_csparentdc(void)
zero_parentdc_test
(
&
test_answer
);
InvalidateRect
(
hwndMain
,
NULL
,
TRUE
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
parentdc_ok
(
test1
,
test_answer
);
zero_parentdc_test
(
&
test_answer
);
SetRect
(
&
rc
,
0
,
0
,
50
,
50
);
InvalidateRect
(
hwndMain
,
&
rc
,
TRUE
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
parentdc_ok
(
test2
,
test_answer
);
zero_parentdc_test
(
&
test_answer
);
SetRect
(
&
rc
,
0
,
0
,
10
,
10
);
InvalidateRect
(
hwndMain
,
&
rc
,
TRUE
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
parentdc_ok
(
test3
,
test_answer
);
zero_parentdc_test
(
&
test_answer
);
SetRect
(
&
rc
,
40
,
40
,
50
,
50
);
InvalidateRect
(
hwndMain
,
&
rc
,
TRUE
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
parentdc_ok
(
test4
,
test_answer
);
zero_parentdc_test
(
&
test_answer
);
SetRect
(
&
rc
,
20
,
20
,
60
,
60
);
InvalidateRect
(
hwndMain
,
&
rc
,
TRUE
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
parentdc_ok
(
test5
,
test_answer
);
zero_parentdc_test
(
&
test_answer
);
SetRect
(
&
rc
,
0
,
0
,
10
,
10
);
InvalidateRect
(
hwnd1
,
&
rc
,
TRUE
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
parentdc_ok
(
test6
,
test_answer
);
zero_parentdc_test
(
&
test_answer
);
SetRect
(
&
rc
,
-
5
,
-
5
,
65
,
65
);
InvalidateRect
(
hwnd1
,
&
rc
,
TRUE
);
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
flush_events
(
);
parentdc_ok
(
test7
,
test_answer
);
DestroyWindow
(
hwndMain
);
...
...
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