}
evas_object_geometry_get(_pd->access_top_button, &wx, &wy, &ww, &wh);
- if (!((x > wx + ww) || (y > wy + wh) || (x < wx - ww) || (y < wy - wh)))
+ Eina_Rect r = EINA_RECT(wx,wy,ww,wh);
+ if (eina_rectangle_coords_inside(&r, x, y))
return _pd->access_top_button;
evas_object_geometry_get(_pd->access_bottom_button, &wx, &wy, &ww, &wh);
- if (!((x > wx + ww) || (y > wy + wh) || (x < wx - ww) || (y < wy - wh)))
+ r = EINA_RECT(wx, wy, ww, wh);
+ if (eina_rectangle_coords_inside(&r, x, y))
return _pd->access_bottom_button;
return NULL;