Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ca52392b
Commit
ca52392b
authored
May 31, 2005
by
Jason Edmeades
Committed by
Alexandre Julliard
May 31, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test case for infinite loops on RDW_REDRAWNOW.
parent
db412aaf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
win.c
dlls/user/tests/win.c
+62
-0
No files found.
dlls/user/tests/win.c
View file @
ca52392b
...
...
@@ -2917,6 +2917,67 @@ static void test_AdjustWindowRect()
}
#undef SHOWSYSMETRIC
/* Global variables to trigger exit from loop */
static
int
redrawComplete
,
WMPAINT_count
;
static
LRESULT
WINAPI
redraw_window_procA
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
{
case
WM_PAINT
:
trace
(
"doing WM_PAINT %d
\n
"
,
WMPAINT_count
);
WMPAINT_count
++
;
if
(
WMPAINT_count
>
10
&&
redrawComplete
==
0
)
{
PAINTSTRUCT
ps
;
BeginPaint
(
hwnd
,
&
ps
);
EndPaint
(
hwnd
,
&
ps
);
return
1
;
}
return
0
;
break
;
}
return
DefWindowProc
(
hwnd
,
msg
,
wparam
,
lparam
);
}
/* Ensure we exit from RedrawNow regardless of invalidated area */
static
void
test_redrawnow
()
{
WNDCLASSA
cls
;
HWND
hwndMain
;
cls
.
style
=
CS_DBLCLKS
;
cls
.
lpfnWndProc
=
redraw_window_procA
;
cls
.
cbClsExtra
=
0
;
cls
.
cbWndExtra
=
0
;
cls
.
hInstance
=
GetModuleHandleA
(
0
);
cls
.
hIcon
=
0
;
cls
.
hCursor
=
LoadCursorA
(
0
,
(
LPSTR
)
IDC_ARROW
);
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszMenuName
=
NULL
;
cls
.
lpszClassName
=
"RedrawWindowClass"
;
if
(
!
RegisterClassA
(
&
cls
))
{
trace
(
"Register failed %ld
\n
"
,
GetLastError
());
return
;
}
hwndMain
=
CreateWindowA
(
"RedrawWindowClass"
,
"Main Window"
,
WS_OVERLAPPEDWINDOW
,
CW_USEDEFAULT
,
0
,
100
,
100
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
WMPAINT_count
==
0
,
"Multiple unexpected WM_PAINT calls %d
\n
"
,
WMPAINT_count
);
ShowWindow
(
hwndMain
,
SW_SHOW
);
ok
(
WMPAINT_count
==
0
,
"Multiple unexpected WM_PAINT calls %d
\n
"
,
WMPAINT_count
);
RedrawWindow
(
hwndMain
,
NULL
,
NULL
,
RDW_UPDATENOW
|
RDW_ALLCHILDREN
);
ok
(
WMPAINT_count
==
1
,
"Multiple unexpected WM_PAINT calls %d
\n
"
,
WMPAINT_count
);
redrawComplete
=
TRUE
;
ok
(
WMPAINT_count
<
10
,
"RedrawWindow (RDW_UPDATENOW) never completed (%d)
\n
"
,
WMPAINT_count
);
/* clean up */
DestroyWindow
(
hwndMain
);
}
START_TEST
(
win
)
{
pGetAncestor
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"user32.dll"
),
"GetAncestor"
);
...
...
@@ -2986,4 +3047,5 @@ START_TEST(win)
test_AdjustWindowRect
();
test_window_styles
();
test_redrawnow
();
}
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