Commit 3365eb7a authored by Alexandre Julliard's avatar Alexandre Julliard

get_visible_region: do not clip out siblings of the top-level window.

parent 95012151
...@@ -522,7 +522,7 @@ static struct region *get_visible_region( struct window *win, struct window *top ...@@ -522,7 +522,7 @@ static struct region *get_visible_region( struct window *win, struct window *top
/* create a region relative to the window itself */ /* create a region relative to the window itself */
if ((flags & DCX_PARENTCLIP) && win->parent) if ((flags & DCX_PARENTCLIP) && win != top && win->parent)
{ {
rectangle_t rect; rectangle_t rect;
rect.left = rect.top = 0; rect.left = rect.top = 0;
...@@ -562,14 +562,13 @@ static struct region *get_visible_region( struct window *win, struct window *top ...@@ -562,14 +562,13 @@ static struct region *get_visible_region( struct window *win, struct window *top
if (top && top != win && (tmp = create_empty_region()) != NULL) if (top && top != win && (tmp = create_empty_region()) != NULL)
{ {
offset_region( region, offset_x, offset_y ); /* make it relative to parent */ offset_region( region, offset_x, offset_y ); /* make it relative to parent */
while (win->parent) while (win != top && win->parent)
{ {
if (win->style & WS_CLIPSIBLINGS) if (win->style & WS_CLIPSIBLINGS)
{ {
if (!clip_children( win->parent, win, region, 0, 0 )) goto error; if (!clip_children( win->parent, win, region, 0, 0 )) goto error;
if (is_region_empty( region )) break; if (is_region_empty( region )) break;
} }
if (win == top) break;
/* clip to parent client area */ /* clip to parent client area */
win = win->parent; win = win->parent;
offset_x += win->client_rect.left; offset_x += win->client_rect.left;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment