# HG changeset patch # User Thinker K.F. Li # Date 1232895798 -28800 # Node ID c990a9a9648f5a0e677ec242f8623c698c751501 # Parent cd6af7da32c9fc03dfb5ad49da394f7e53290572 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. diff -r cd6af7da32c9 -r c990a9a9648f examples/calculator/main.c --- 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; } }