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
28a8caca
Commit
28a8caca
authored
Sep 02, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetUpdateRect should return TRUE even if only the non-client area is
invalid (reported by Rein Klazes).
parent
0b12efaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
2 deletions
+60
-2
painting.c
dlls/user/painting.c
+15
-2
msg.c
dlls/user/tests/msg.c
+45
-0
No files found.
dlls/user/painting.c
View file @
28a8caca
...
...
@@ -314,8 +314,15 @@ INT WINAPI GetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
*/
BOOL
WINAPI
GetUpdateRect
(
HWND
hwnd
,
LPRECT
rect
,
BOOL
erase
)
{
WND
*
wndPtr
;
BOOL
ret
=
FALSE
;
HRGN
update_rgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
INT
retval
=
GetUpdateRgn
(
hwnd
,
update_rgn
,
erase
);
if
(
GetUpdateRgn
(
hwnd
,
update_rgn
,
erase
)
==
ERROR
)
{
DeleteObject
(
update_rgn
);
return
FALSE
;
}
if
(
rect
)
{
...
...
@@ -332,7 +339,13 @@ BOOL WINAPI GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase )
}
DeleteObject
(
update_rgn
);
return
(
retval
!=
ERROR
&&
retval
!=
NULLREGION
);
wndPtr
=
WIN_GetPtr
(
hwnd
);
if
(
wndPtr
&&
wndPtr
!=
WND_OTHER_PROCESS
)
{
ret
=
(
wndPtr
->
hrgnUpdate
!=
0
);
WIN_ReleasePtr
(
wndPtr
);
}
return
ret
;
}
...
...
dlls/user/tests/msg.c
View file @
28a8caca
...
...
@@ -1899,6 +1899,7 @@ static const struct message WmPaint[] = {
static
void
test_paint_messages
(
void
)
{
RECT
rect
;
MSG
msg
;
HRGN
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
HRGN
hrgn2
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
HWND
hwnd
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test overlapped"
,
WS_OVERLAPPEDWINDOW
,
...
...
@@ -1981,6 +1982,50 @@ static void test_paint_messages(void)
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_VALIDATE
|
RDW_NOERASE
|
RDW_UPDATENOW
);
ok_sequence
(
WmPaint
,
"Paint"
,
FALSE
);
flush_sequence
();
SetRectRgn
(
hrgn
,
-
4
,
-
4
,
-
2
,
-
2
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
|
RDW_FRAME
);
SetRectRgn
(
hrgn
,
-
4
,
-
4
,
-
3
,
-
3
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_ERASENOW
);
ok_sequence
(
WmEmptySeq
,
"EmptySeq"
,
FALSE
);
flush_sequence
();
SetRectRgn
(
hrgn
,
-
4
,
-
4
,
-
2
,
-
2
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
|
RDW_FRAME
);
SetRectRgn
(
hrgn
,
-
4
,
-
4
,
-
3
,
-
3
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_VALIDATE
|
RDW_NOFRAME
);
SetRectRgn
(
hrgn
,
0
,
0
,
1
,
1
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
|
RDW_UPDATENOW
);
ok_sequence
(
WmPaint
,
"Paint"
,
TRUE
);
flush_sequence
();
SetRectRgn
(
hrgn
,
-
4
,
-
4
,
-
1
,
-
1
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
|
RDW_FRAME
);
RedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_ERASENOW
);
/* make sure no WM_PAINT was generated */
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
ok_sequence
(
WmInvalidateRgn
,
"InvalidateRgn"
,
FALSE
);
flush_sequence
();
SetRectRgn
(
hrgn
,
-
4
,
-
4
,
-
1
,
-
1
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
|
RDW_FRAME
);
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
msg
.
hwnd
==
hwnd
&&
msg
.
message
==
WM_PAINT
)
{
/* GetUpdateRgn must return empty region since only nonclient area is invalidated */
INT
ret
=
GetUpdateRgn
(
hwnd
,
hrgn
,
FALSE
);
ok
(
ret
==
NULLREGION
,
"Invalid GetUpdateRgn result %d
\n
"
,
ret
);
ret
=
GetUpdateRect
(
hwnd
,
&
rect
,
FALSE
);
ok
(
ret
,
"Invalid GetUpdateRect result %d
\n
"
,
ret
);
/* this will send WM_NCPAINT and validate the non client area */
ret
=
GetUpdateRect
(
hwnd
,
&
rect
,
TRUE
);
ok
(
!
ret
,
"Invalid GetUpdateRect result %d
\n
"
,
ret
);
}
else
DispatchMessage
(
&
msg
);
}
ok_sequence
(
WmInvalidateRgn
,
"InvalidateRgn"
,
FALSE
);
DeleteObject
(
hrgn
);
DeleteObject
(
hrgn2
);
DestroyWindow
(
hwnd
);
...
...
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