summaryrefslogtreecommitdiff
path: root/components/rtgui/widgets/widget.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-01-25 00:05:52 +0000
committer[email protected] <[email protected]>2011-01-25 00:05:52 +0000
commit211e1aa33446574d3b6e11bd3cefc27fb6b9306b (patch)
treea0dd64fceabe8d8c46fa70e7a3c195fc7f272d79 /components/rtgui/widgets/widget.c
parentffa3e22d2e7440a6e93e8142e18a7c6a17997511 (diff)
re-write external clip.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1261 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/widgets/widget.c')
-rw-r--r--components/rtgui/widgets/widget.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/components/rtgui/widgets/widget.c b/components/rtgui/widgets/widget.c
index 304e59b86c..0946dd8fa0 100644
--- a/components/rtgui/widgets/widget.c
+++ b/components/rtgui/widgets/widget.c
@@ -509,11 +509,8 @@ void rtgui_widget_hide(rtgui_widget_t* widget)
if (widget->parent != RT_NULL)
{
- int index;
rtgui_widget_t *parent;
- rtgui_toplevel_t *toplevel;
- rect = widget->extent;
parent = widget->parent;
/* get the no transparent parent */
while (parent != RT_NULL && parent->flag & RTGUI_WIDGET_FLAG_TRANSPARENT)
@@ -522,16 +519,10 @@ void rtgui_widget_hide(rtgui_widget_t* widget)
}
/* union widget rect */
- rtgui_region_union_rect(&(widget->parent->clip), &(widget->parent->clip), &rect);
+ rtgui_region_union_rect(&(parent->clip), &(parent->clip), &(widget->extent));
- /* handle extern rect */
- toplevel = RTGUI_TOPLEVEL(widget->toplevel);
/* subtract the external rect */
- for (index = 0; index < toplevel->external_clip_size; index ++)
- {
- rtgui_region_subtract_rect(&(widget->parent->clip), &(widget->parent->clip),
- &(toplevel->external_clip_rect[index]));
- }
+ rtgui_topwin_do_clip(RTGUI_WIDGET(parent));
}
}