# HG changeset patch # User Thinker K.F. Li # Date 1218589929 -28800 # Node ID 92cfabe22d6bafee3fcdcb8cbcc574aeac04519c # Parent a6150b4e066730d5534df1b04dd3949d1e8541ea find_shape_at_pos() finds a shape from clean ones. diff -r a6150b4e0667 -r 92cfabe22d6b src/event.c --- a/src/event.c Wed Aug 13 08:21:06 2008 +0800 +++ b/src/event.c Wed Aug 13 09:12:09 2008 +0800 @@ -84,7 +84,7 @@ } } -static geo_t *find_pos_in_geo(redraw_man_t *rdman, +static geo_t *find_geo_in_pos(redraw_man_t *rdman, co_aix x, co_aix y, int *in_stroke) { geo_t *geo; geo_t **geos; @@ -96,6 +96,8 @@ cr = rdman->cr; for(i = rdman->n_gen_geos - 1; i >= 0; i--) { geo = geos[i]; + if(geo->flags & GEF_DIRTY) + continue; shape = geo->shape; draw_shape_path(shape, cr); if(shape->fill) { @@ -127,7 +129,7 @@ if(r != OK) return NULL; - geo = find_pos_in_geo(rdman, x, y, in_stroke); + geo = find_geo_in_pos(rdman, x, y, in_stroke); if(geo == NULL) return NULL;