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
5bd497f3
Commit
5bd497f3
authored
Aug 27, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Moving a window should only expose the immediate parent.
parent
a887a64c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
32 deletions
+17
-32
win.c
dlls/user32/tests/win.c
+6
-12
window.c
server/window.c
+11
-20
No files found.
dlls/user32/tests/win.c
View file @
5bd497f3
...
...
@@ -4231,12 +4231,9 @@ static void test_GetUpdateRect(void)
ShowWindow
(
hchild
,
SW_HIDE
);
SetRect
(
&
rc2
,
0
,
0
,
0
,
0
);
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
todo_wine
{
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
}
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
SetRect
(
&
rc2
,
10
,
10
,
40
,
40
);
GetUpdateRect
(
hparent
,
&
rc1
,
FALSE
);
...
...
@@ -4277,12 +4274,9 @@ static void test_GetUpdateRect(void)
ShowWindow
(
hchild
,
SW_HIDE
);
SetRect
(
&
rc2
,
0
,
0
,
0
,
0
);
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
todo_wine
{
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
}
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
SetRect
(
&
rc2
,
10
,
10
,
40
,
40
);
GetUpdateRect
(
hparent
,
&
rc1
,
FALSE
);
...
...
server/window.c
View file @
5bd497f3
...
...
@@ -1293,28 +1293,19 @@ static unsigned int get_window_update_flags( struct window *win, struct window *
}
/* expose a region of a window
, looking for the top most parent that needs to be exposed
*/
/* expose a region of a window
on its parent
*/
/* the region is in window coordinates */
static
void
expose_window
(
struct
window
*
win
,
struct
window
*
top
,
struct
region
*
region
)
static
void
expose_window
(
struct
window
*
win
,
struct
region
*
region
)
{
struct
window
*
parent
,
*
ptr
;
int
offset_x
,
offset_y
;
/* find the top most parent that doesn't clip either siblings or children */
for
(
parent
=
ptr
=
win
;
ptr
!=
top
;
ptr
=
ptr
->
parent
)
{
if
(
!
(
ptr
->
style
&
WS_CLIPCHILDREN
))
parent
=
ptr
;
if
(
!
(
ptr
->
style
&
WS_CLIPSIBLINGS
))
parent
=
ptr
->
parent
;
}
if
(
parent
==
win
&&
parent
!=
top
&&
win
->
parent
)
parent
=
win
->
parent
;
/* always go up at least one level if possible */
struct
window
*
parent
=
win
;
int
offset_x
=
win
->
window_rect
.
left
-
win
->
client_rect
.
left
;
int
offset_y
=
win
->
window_rect
.
top
-
win
->
client_rect
.
top
;
offset_x
=
win
->
window_rect
.
left
-
win
->
client_rect
.
left
;
offset_y
=
win
->
window_rect
.
top
-
win
->
client_rect
.
top
;
for
(
ptr
=
win
;
ptr
!=
parent
&&
!
is_desktop_window
(
ptr
);
ptr
=
ptr
->
parent
)
if
(
win
->
parent
&&
!
is_desktop_window
(
win
->
parent
))
{
offset_x
+=
ptr
->
client_rect
.
left
;
offset_y
+=
ptr
->
client_rect
.
top
;
offset_x
+=
win
->
client_rect
.
left
;
offset_y
+=
win
->
client_rect
.
top
;
parent
=
win
->
parent
;
}
offset_region
(
region
,
offset_x
,
offset_y
);
redraw_window
(
parent
,
region
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
|
RDW_ALLCHILDREN
);
...
...
@@ -1370,7 +1361,7 @@ static void set_window_pos( struct window *win, struct window *previous,
offset_region
(
old_vis_rgn
,
old_window_rect
.
left
-
window_rect
->
left
,
old_window_rect
.
top
-
window_rect
->
top
);
if
(
xor_region
(
new_vis_rgn
,
old_vis_rgn
,
new_vis_rgn
))
expose_window
(
win
,
top
,
new_vis_rgn
);
expose_window
(
win
,
new_vis_rgn
);
}
free_region
(
old_vis_rgn
);
...
...
@@ -1455,7 +1446,7 @@ static void set_window_region( struct window *win, struct region *region, int re
{
/* expose anything revealed by the change */
if
(
xor_region
(
new_vis_rgn
,
old_vis_rgn
,
new_vis_rgn
))
expose_window
(
win
,
top
,
new_vis_rgn
);
expose_window
(
win
,
new_vis_rgn
);
free_region
(
new_vis_rgn
);
}
...
...
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