summaryrefslogtreecommitdiff
path: root/components/gui/src/rtgui_system.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-01-20 12:15:14 +0800
committerGitHub <[email protected]>2018-01-20 12:15:14 +0800
commit7d049d57db1bbbb29123f1089acc04f886203d10 (patch)
tree1da75d9520d964b35571a82465c8cf7e346adb43 /components/gui/src/rtgui_system.c
parent973a5fb885cb7edc55d5aed6ce2445cb457d7f6c (diff)
parent0415298ceb1d4eb529165c6618b5f8eaea485641 (diff)
Merge pull request #1182 from yangfasheng/master
gui 引擎优化;
Diffstat (limited to 'components/gui/src/rtgui_system.c')
-rw-r--r--components/gui/src/rtgui_system.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/components/gui/src/rtgui_system.c b/components/gui/src/rtgui_system.c
index 8cdfe763c7..1803c9cf66 100644
--- a/components/gui/src/rtgui_system.c
+++ b/components/gui/src/rtgui_system.c
@@ -87,6 +87,7 @@ INIT_APP_EXPORT(rtgui_system_server_init);
/************************************************************************/
static void rtgui_time_out(void *parameter)
{
+ rt_err_t result;
rtgui_timer_t *timer;
rtgui_event_timer_t event;
timer = (rtgui_timer_t *)parameter;
@@ -103,7 +104,11 @@ static void rtgui_time_out(void *parameter)
event.timer = timer;
timer->pending_cnt++;
- rtgui_send(timer->app, &(event.parent), sizeof(rtgui_event_timer_t));
+ result = rtgui_send(timer->app, &(event.parent), sizeof(rtgui_event_timer_t));
+ if (result == RT_EOK)
+ {
+ timer->pending_cnt++;
+ }
}
rtgui_timer_t *rtgui_timer_create(rt_int32_t time, rt_int32_t flag, rtgui_timeout_func timeout, void *parameter)
@@ -417,7 +422,7 @@ const char *rtgui_event_string[] =
"WIN_CLOSE", /* close a window */
"WIN_MOVE", /* move a window */
"WIN_RESIZE", /* resize a window */
- "WIN_UPDATE_END",
+ "WIN_UPDATE_END",
"WIN_MODAL_ENTER", /* a window modals */
"SET_WM", /* set window manager */
@@ -547,8 +552,8 @@ static void rtgui_event_dump(struct rtgui_app* app, rtgui_event_t *event)
break;
case RTGUI_EVENT_WIN_ACTIVATE:
- case RTGUI_EVENT_WIN_DESTROY:
- case RTGUI_EVENT_WIN_CLOSE:
+ case RTGUI_EVENT_WIN_DESTROY:
+ case RTGUI_EVENT_WIN_CLOSE:
case RTGUI_EVENT_WIN_DEACTIVATE:
case RTGUI_EVENT_WIN_SHOW:
case RTGUI_EVENT_WIN_HIDE: