changeset 271:c990a9a9648f

Fix bug of calculator. - calc can not handle button press event. - It caused by miss-understanding event_t::cur_tgt. It is a subject, not a shape that calc think. - event_t::cur_tgt::obj is a shape that calc want. It is a the subject that the subject stands for.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 25 Jan 2009 23:03:18 +0800
parents cd6af7da32c9
children 0cadeb9fdfc3
files examples/calculator/main.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/examples/calculator/main.c	Sun Jan 25 16:07:43 2009 +0800
+++ b/examples/calculator/main.c	Sun Jan 25 23:03:18 2009 +0800
@@ -144,7 +144,7 @@
 
     switch(evt->type) {
     case EVT_MOUSE_BUT_PRESS:
-	compute(calc_data, (coord_t *)evt->cur_tgt);
+	compute(calc_data, (coord_t *)evt->cur_tgt->obj);
 	break;
     }
 }