diff options
| author | bernard.xiong <[email protected]> | 2010-01-25 23:38:47 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-01-25 23:38:47 +0000 |
| commit | 0c817b1d16c2edb745704955005e71448caded5e (patch) | |
| tree | 991b43e5d9575cf1fe5da4e63c58e28f520fc58d /rtgui/widgets | |
| parent | 9fb4908710ea9ddca5fd7d6cdd4cf656e98b8bbb (diff) | |
move the onbutton call back to the end of event handler in button widget.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@337 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'rtgui/widgets')
| -rw-r--r-- | rtgui/widgets/button.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rtgui/widgets/button.c b/rtgui/widgets/button.c index a68e0771e1..45db6239fb 100644 --- a/rtgui/widgets/button.c +++ b/rtgui/widgets/button.c @@ -165,18 +165,18 @@ rt_bool_t rtgui_button_event_handler(struct rtgui_widget* widget, struct rtgui_e #endif rtgui_theme_draw_button(btn); - if (!(btn->flag & RTGUI_BUTTON_FLAG_PRESS) && (btn->on_button != RT_NULL)) - { - /* call on button handler */ - btn->on_button(widget, event); - } - #ifndef RTGUI_USING_SMALL_SIZE /* invokes call back */ if (widget->on_mouseclick != RT_NULL && emouse->button & RTGUI_MOUSE_BUTTON_UP) return widget->on_mouseclick(widget, event); #endif + + if (!(btn->flag & RTGUI_BUTTON_FLAG_PRESS) && (btn->on_button != RT_NULL)) + { + /* call on button handler */ + btn->on_button(widget, event); + } } } |
