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
a684b634
Commit
a684b634
authored
Sep 22, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Try harder to flush paint events before checking the window contents.
parent
e2cc32d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
static.c
dlls/user32/tests/static.c
+17
-1
No files found.
dlls/user32/tests/static.c
View file @
a684b634
...
...
@@ -40,6 +40,22 @@ static HWND hMainWnd;
static
int
g_nReceivedColorStatic
=
0
;
/* 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
HWND
build_static
(
DWORD
style
)
{
return
CreateWindow
(
"static"
,
"Test"
,
WS_VISIBLE
|
WS_CHILD
|
style
,
5
,
5
,
100
,
100
,
hMainWnd
,
(
HMENU
)
CTRL_ID
,
NULL
,
0
);
...
...
@@ -70,6 +86,7 @@ static void test_updates(int style, int flags)
HWND
hStatic
=
build_static
(
style
);
int
exp
;
flush_events
();
trace
(
"Testing style 0x%x
\n
"
,
style
);
g_nReceivedColorStatic
=
0
;
/* during each update parent WndProc will test the WM_CTLCOLORSTATIC message */
...
...
@@ -122,7 +139,6 @@ START_TEST(static)
hMainWnd
=
CreateWindow
(
szClassName
,
"Test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
500
,
500
,
NULL
,
NULL
,
GetModuleHandle
(
NULL
),
NULL
);
ShowWindow
(
hMainWnd
,
SW_SHOW
);
UpdateWindow
(
hMainWnd
);
test_updates
(
0
,
0
);
test_updates
(
SS_SIMPLE
,
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