The special handling of mouse-over detection for bitmaps and icons seems unnecessary since the the member 'h' is always present and can always be assumed to be initialized. Furthermore the special handling prevented multiline textentries to be treated correctly. Therefore the special handling is now completely removed (and the handling of the 'h' member is adjusted).

This commit is contained in:
oliverschmidt 2006-08-30 23:12:33 +00:00
parent 162ca26b65
commit d3d215d142

View file

@ -44,7 +44,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: ctk.c,v 1.3 2006/08/15 00:13:23 oliverschmidt Exp $ * $Id: ctk.c,v 1.4 2006/08/30 23:12:33 oliverschmidt Exp $
* *
*/ */
@ -1600,14 +1600,9 @@ PROCESS_THREAD(ctk_process, ev, data)
widget = widget->next) { widget = widget->next) {
if(mxc >= widget->x && if(mxc >= widget->x &&
mxc <= widget->x + widget->w && mxc <= widget->x + widget->w + 1 &&
(myc == widget->y || myc >= widget->y &&
((widget->type == CTK_WIDGET_BITMAP || myc <= widget->y + widget->h - 1) {
/*widget->type == CTK_WIDGET_TEXTMAP ||*/
widget->type == CTK_WIDGET_ICON) &&
(myc >= widget->y &&
myc <= widget->y +
((struct ctk_bitmap *)widget)->h)))) {
break; break;
} }
} }