Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
28a8caca
Commit
28a8caca
authored
20 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
GetUpdateRect should return TRUE even if only the non-client area is
invalid (reported by Rein Klazes).
parent
0b12efaa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/user/painting.c
+15
-2
15 additions, 2 deletions
dlls/user/painting.c
dlls/user/tests/msg.c
+45
-0
45 additions, 0 deletions
dlls/user/tests/msg.c
with
60 additions
and
2 deletions
dlls/user/painting.c
+
15
−
2
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
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/user/tests/msg.c
+
45
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment