summaryrefslogtreecommitdiff
path: root/components/rtgui/include
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2011-06-29 09:57:28 +0000
committerbernard.xiong <[email protected]>2011-06-29 09:57:28 +0000
commita69172aa4efa4675a826f85a62245b3c58eec568 (patch)
tree50889122f189ca939bc9abaa1b9d2177bac8a905 /components/rtgui/include
parent3f5782a322f668fba9677714e6401c477dbc65b9 (diff)
fix button status issue, which caused by mouse released outside of button but button handled the mouse press event last time.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1547 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/include')
-rw-r--r--components/rtgui/include/rtgui/widgets/toplevel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/rtgui/include/rtgui/widgets/toplevel.h b/components/rtgui/include/rtgui/widgets/toplevel.h
index 1382626805..3b46aeaa5c 100644
--- a/components/rtgui/include/rtgui/widgets/toplevel.h
+++ b/components/rtgui/include/rtgui/widgets/toplevel.h
@@ -24,6 +24,9 @@ DECLARE_CLASS_TYPE(toplevel);
/** Checks if the object is an rtgui_toplevel */
#define RTGUI_IS_TOPLEVEL(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_TOPLEVEL_TYPE))
+/* last mouse event handled widget */
+#define RTGUI_TOPLEVEL_LAST_MEVENT_WIDGET(obj) (RTGUI_TOPLEVEL(obj)->last_mevent_widget)
+
struct rtgui_toplevel
{
/* inherit from container */
@@ -38,6 +41,9 @@ struct rtgui_toplevel
/* server thread id */
rt_thread_t server;
+
+ /* last mouse event handled widget */
+ rtgui_widget_t* last_mevent_widget;
};
typedef struct rtgui_toplevel rtgui_toplevel_t;