event: get coordinates of visible widgets only

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-10-20 19:48:33 +02:00
parent 08a700f132
commit 0e3ff0bc8f
1 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,8 @@ widget_getbycoords(position_t position, widget_node_t *widgets, int width, int h
}
for(w = widgets; w; w = w->next)
if(*x >= w->area.x && *x < w->area.x + w->area.width
if(w->widget->isvisible &&
*x >= w->area.x && *x < w->area.x + w->area.width
&& *y >= w->area.y && *y < w->area.y + w->area.height)
return w;