diff options
| author | bernard.xiong <[email protected]> | 2010-02-05 00:05:30 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-02-05 00:05:30 +0000 |
| commit | f868c8540a61901891a8d779604e1fecbc921b3d (patch) | |
| tree | dbd0190abe8507bbaf3c29a9f3c5f648fd45a53c /rtgui/server | |
| parent | d5b20ba603ae674e1f2f34226b555b0d8702a6bf (diff) | |
fix no win title issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@375 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'rtgui/server')
| -rw-r--r-- | rtgui/server/topwin.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/rtgui/server/topwin.c b/rtgui/server/topwin.c index 6eccc483cc..c8f2b903dc 100644 --- a/rtgui/server/topwin.c +++ b/rtgui/server/topwin.c @@ -304,11 +304,14 @@ void rtgui_topwin_raise(struct rtgui_win* wid, rt_thread_t sender) rtgui_thread_send(wnd->tid, &(eclip.parent), sizeof(struct rtgui_event_clip_info)); /* reset clip info in title */ - rtgui_toplevel_handle_clip(RTGUI_TOPLEVEL(wnd->title), &eclip); - rtgui_toplevel_update_clip(RTGUI_TOPLEVEL(wnd->title)); - rtgui_region_subtract_rect(&(RTGUI_WIDGET(wnd->title)->clip), - &(RTGUI_WIDGET(wnd->title)->clip), - &(wnd->extent)); + if (wnd->title != RT_NULL) + { + rtgui_toplevel_handle_clip(RTGUI_TOPLEVEL(wnd->title), &eclip); + rtgui_toplevel_update_clip(RTGUI_TOPLEVEL(wnd->title)); + rtgui_region_subtract_rect(&(RTGUI_WIDGET(wnd->title)->clip), + &(RTGUI_WIDGET(wnd->title)->clip), + &(wnd->extent)); + } } rtgui_topwin_activate_win(topwin); @@ -356,11 +359,14 @@ void rtgui_topwin_raise(struct rtgui_win* wid, rt_thread_t sender) rtgui_thread_send(topwin->tid, &(eclip->parent), sizeof(struct rtgui_event_clip_info)); /* reset clip info in title */ - rtgui_toplevel_handle_clip(RTGUI_TOPLEVEL(topwin->title), eclip); - rtgui_toplevel_update_clip(RTGUI_TOPLEVEL(topwin->title)); - rtgui_region_subtract_rect(&(RTGUI_WIDGET(topwin->title)->clip), - &(RTGUI_WIDGET(topwin->title)->clip), - &(topwin->extent)); + if (topwin->title != RT_NULL) + { + rtgui_toplevel_handle_clip(RTGUI_TOPLEVEL(topwin->title), eclip); + rtgui_toplevel_update_clip(RTGUI_TOPLEVEL(topwin->title)); + rtgui_region_subtract_rect(&(RTGUI_WIDGET(topwin->title)->clip), + &(RTGUI_WIDGET(topwin->title)->clip), + &(topwin->extent)); + } rect = RTGUI_EVENT_GET_RECT(eclip, 0); *rect = (topwin->title != RT_NULL)? RTGUI_WIDGET(topwin->title)->extent : topwin->extent; @@ -381,11 +387,14 @@ void rtgui_topwin_raise(struct rtgui_win* wid, rt_thread_t sender) sizeof(struct rtgui_event_clip_info) + count * sizeof(struct rtgui_rect)); /* reset clip info in title */ - rtgui_toplevel_handle_clip(RTGUI_TOPLEVEL(wnd->title), eclip); - rtgui_toplevel_update_clip(RTGUI_TOPLEVEL(wnd->title)); - rtgui_region_subtract_rect(&(RTGUI_WIDGET(wnd->title)->clip), - &(RTGUI_WIDGET(wnd->title)->clip), - &(wnd->extent)); + if (wnd->title != RT_NULL) + { + rtgui_toplevel_handle_clip(RTGUI_TOPLEVEL(wnd->title), eclip); + rtgui_toplevel_update_clip(RTGUI_TOPLEVEL(wnd->title)); + rtgui_region_subtract_rect(&(RTGUI_WIDGET(wnd->title)->clip), + &(RTGUI_WIDGET(wnd->title)->clip), + &(wnd->extent)); + } rect = RTGUI_EVENT_GET_RECT(eclip, count++); *rect = (wnd->title != RT_NULL)? RTGUI_WIDGET(wnd->title)->extent : wnd->extent; |
