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
05a8974e
Commit
05a8974e
authored
Mar 14, 2008
by
Clinton Stimpson
Committed by
Alexandre Julliard
Mar 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Test processing of expose events.
parent
0f8b16f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
win.c
dlls/user32/tests/win.c
+56
-0
No files found.
dlls/user32/tests/win.c
View file @
05a8974e
...
...
@@ -4563,6 +4563,61 @@ static void test_GetUpdateRect(void)
DestroyWindow
(
hgrandparent
);
}
static
LRESULT
CALLBACK
TestExposedRegion_WndProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
msg
==
WM_PAINT
)
{
PAINTSTRUCT
ps
;
RECT
updateRect
;
DWORD
waitResult
;
HWND
win
;
const
int
waitTime
=
2000
;
BeginPaint
(
hwnd
,
&
ps
);
/* create and destroy window to create an exposed region on this window */
win
=
CreateWindowA
(
"static"
,
"win"
,
WS_VISIBLE
,
10
,
10
,
50
,
50
,
NULL
,
NULL
,
0
,
NULL
);
DestroyWindow
(
win
);
waitResult
=
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
waitTime
,
QS_PAINT
,
0
);
ValidateRect
(
hwnd
,
NULL
);
EndPaint
(
hwnd
,
&
ps
);
if
(
waitResult
!=
WAIT_TIMEOUT
)
{
GetUpdateRect
(
hwnd
,
&
updateRect
,
FALSE
);
todo_wine
{
ok
(
!
IsRectEmpty
(
&
updateRect
),
"Exposed rect should not be empty
\n
"
);
}
}
return
1
;
}
return
DefWindowProc
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
void
test_Expose
(
void
)
{
ATOM
atom
;
WNDCLASSA
cls
;
HWND
mw
;
memset
(
&
cls
,
0
,
sizeof
(
WNDCLASSA
));
cls
.
lpfnWndProc
=
TestExposedRegion_WndProc
;
cls
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
cls
.
lpszClassName
=
"TestExposeClass"
;
atom
=
RegisterClassA
(
&
cls
);
mw
=
CreateWindowA
(
"TestExposeClass"
,
"MainWindow"
,
WS_VISIBLE
|
WS_OVERLAPPEDWINDOW
,
0
,
0
,
200
,
100
,
NULL
,
NULL
,
0
,
NULL
);
UpdateWindow
(
mw
);
DestroyWindow
(
mw
);
}
START_TEST
(
win
)
{
pGetAncestor
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"user32.dll"
),
"GetAncestor"
);
...
...
@@ -4645,6 +4700,7 @@ START_TEST(win)
test_ShowWindow
();
test_gettext
();
test_GetUpdateRect
();
test_Expose
();
/* add the tests above this line */
UnhookWindowsHookEx
(
hhook
);
...
...
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