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
30c0639b
Commit
30c0639b
authored
May 12, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Crop the invalidate region against the rectangles of all parents.
parent
bc25119c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
msg.c
dlls/user32/tests/msg.c
+6
-0
window.c
server/window.c
+17
-13
No files found.
dlls/user32/tests/msg.c
View file @
30c0639b
...
...
@@ -5824,6 +5824,12 @@ static void test_paint_messages(void)
SetRectRgn
(
hrgn
,
30
,
30
,
40
,
40
);
check_update_rgn
(
hchild
,
hrgn
);
/* invalidated region is cropped by the parent rects */
SetRect
(
&
rect
,
0
,
0
,
50
,
50
);
RedrawWindow
(
hchild
,
&
rect
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
);
SetRectRgn
(
hrgn
,
30
,
30
,
50
,
50
);
check_update_rgn
(
hchild
,
hrgn
);
DestroyWindow
(
hparent
);
ok
(
!
IsWindow
(
hchild
),
"child must be destroyed with its parent
\n
"
);
flush_sequence
();
...
...
server/window.c
View file @
30c0639b
...
...
@@ -1036,23 +1036,27 @@ static int get_window_visible_rect( struct window *win, rectangle_t *rect, int f
/* and converted from client to window coordinates. Helper for (in)validate_window. */
static
struct
region
*
crop_region_to_win_rect
(
struct
window
*
win
,
struct
region
*
region
,
int
frame
)
{
struct
region
*
tmp
=
create_empty_region
();
rectangle_t
rect
;
struct
region
*
tmp
;
if
(
!
tmp
)
return
NULL
;
if
(
!
get_window_visible_rect
(
win
,
&
rect
,
frame
))
return
NULL
;
if
(
!
(
tmp
=
create_empty_region
()))
return
NULL
;
set_region_rect
(
tmp
,
&
rect
);
/* get bounding rect in client coords */
if
(
frame
)
set_region_rect
(
tmp
,
&
win
->
window_rect
);
else
set_region_client_rect
(
tmp
,
win
);
if
(
!
is_desktop_window
(
win
))
offset_region
(
tmp
,
-
win
->
client_rect
.
left
,
-
win
->
client_rect
.
top
);
if
(
region
)
{
/* map it to client coords */
offset_region
(
tmp
,
win
->
window_rect
.
left
-
win
->
client_rect
.
left
,
win
->
window_rect
.
top
-
win
->
client_rect
.
top
);
/* intersect specified region with bounding rect */
if
(
region
&&
!
intersect_region
(
tmp
,
region
,
tmp
))
goto
done
;
if
(
is_region_empty
(
tmp
))
goto
done
;
/* intersect specified region with bounding rect */
if
(
!
intersect_region
(
tmp
,
region
,
tmp
))
goto
done
;
if
(
is_region_empty
(
tmp
))
goto
done
;
/* map it to window coords */
offset_region
(
tmp
,
win
->
client_rect
.
left
-
win
->
window_rect
.
left
,
win
->
client_rect
.
top
-
win
->
window_rect
.
top
);
/* map it back to window coords */
offset_region
(
tmp
,
win
->
client_rect
.
left
-
win
->
window_rect
.
left
,
win
->
client_rect
.
top
-
win
->
window_rect
.
top
);
}
return
tmp
;
done:
...
...
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