event: get coordinates of visible widgets only
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
08a700f132
commit
0e3ff0bc8f
3
event.c
3
event.c
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue