fix view and workbench destroy issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@943 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
cf2d8031cf
commit
bddae69d9c
|
@ -136,7 +136,6 @@ void rtgui_server_thread_panel_hide(struct rtgui_event_panel_hide* event)
|
||||||
if (panel != RT_NULL)
|
if (panel != RT_NULL)
|
||||||
{
|
{
|
||||||
rt_thread_t tid;
|
rt_thread_t tid;
|
||||||
struct rtgui_event_paint epaint;
|
|
||||||
|
|
||||||
/* send the responses */
|
/* send the responses */
|
||||||
rtgui_thread_ack(RTGUI_EVENT(event), RTGUI_STATUS_OK);
|
rtgui_thread_ack(RTGUI_EVENT(event), RTGUI_STATUS_OK);
|
||||||
|
@ -153,15 +152,20 @@ void rtgui_server_thread_panel_hide(struct rtgui_event_panel_hide* event)
|
||||||
rtgui_list_append(&(panel->thread_list), &(thread->list));
|
rtgui_list_append(&(panel->thread_list), &(thread->list));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get new active thread */
|
|
||||||
tid = rtgui_panel_get_active_thread(panel);
|
|
||||||
/* send all topwin clip info */
|
/* send all topwin clip info */
|
||||||
rtgui_topwin_update_clip_to_panel(panel);
|
rtgui_topwin_update_clip_to_panel(panel);
|
||||||
|
|
||||||
/* send paint event */
|
/* get new active thread */
|
||||||
RTGUI_EVENT_PAINT_INIT(&epaint);
|
tid = rtgui_panel_get_active_thread(panel);
|
||||||
epaint.wid = RT_NULL;
|
if (tid != RT_NULL)
|
||||||
rtgui_thread_send(tid, (struct rtgui_event*)&epaint, sizeof(epaint));
|
{
|
||||||
|
struct rtgui_event_paint epaint;
|
||||||
|
|
||||||
|
/* send paint event */
|
||||||
|
RTGUI_EVENT_PAINT_INIT(&epaint);
|
||||||
|
epaint.wid = RT_NULL;
|
||||||
|
rtgui_thread_send(tid, (struct rtgui_event*)&epaint, sizeof(epaint));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -135,9 +135,6 @@ void rtgui_workbench_destroy(rtgui_workbench_t* workbench)
|
||||||
{
|
{
|
||||||
RT_ASSERT(workbench != RT_NULL);
|
RT_ASSERT(workbench != RT_NULL);
|
||||||
|
|
||||||
/* hide workbench firstly */
|
|
||||||
rtgui_workbench_hide(workbench);
|
|
||||||
|
|
||||||
if (RTGUI_TOPLEVEL(workbench)->server != RT_NULL)
|
if (RTGUI_TOPLEVEL(workbench)->server != RT_NULL)
|
||||||
{
|
{
|
||||||
struct rtgui_event_panel_detach edetach;
|
struct rtgui_event_panel_detach edetach;
|
||||||
|
@ -398,6 +395,9 @@ rt_bool_t rtgui_workbench_event_handler(rtgui_widget_t* widget, rtgui_event_t* e
|
||||||
{
|
{
|
||||||
rtgui_view_t* view;
|
rtgui_view_t* view;
|
||||||
|
|
||||||
|
/* un-hide workbench */
|
||||||
|
RTGUI_WIDGET_UNHIDE(widget);
|
||||||
|
|
||||||
/* paint a view */
|
/* paint a view */
|
||||||
view = workbench->current_view;
|
view = workbench->current_view;
|
||||||
if (view != RT_NULL)
|
if (view != RT_NULL)
|
||||||
|
|
Loading…
Reference in New Issue