From d3d215d142dffa7458cc8ff4a0d5ceb79fc17ee2 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Wed, 30 Aug 2006 23:12:33 +0000 Subject: [PATCH] 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). --- core/ctk/ctk.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/core/ctk/ctk.c b/core/ctk/ctk.c index c263f09c3..243f755d4 100644 --- a/core/ctk/ctk.c +++ b/core/ctk/ctk.c @@ -44,7 +44,7 @@ * * 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) { if(mxc >= widget->x && - mxc <= widget->x + widget->w && - (myc == widget->y || - ((widget->type == CTK_WIDGET_BITMAP || - /*widget->type == CTK_WIDGET_TEXTMAP ||*/ - widget->type == CTK_WIDGET_ICON) && - (myc >= widget->y && - myc <= widget->y + - ((struct ctk_bitmap *)widget)->h)))) { + mxc <= widget->x + widget->w + 1 && + myc >= widget->y && + myc <= widget->y + widget->h - 1) { break; } }