diff --git a/src/ztk_widget.c b/src/ztk_widget.c index 2cf88c2..246f13c 100644 --- a/src/ztk_widget.c +++ b/src/ztk_widget.c @@ -76,12 +76,18 @@ ztk_widget_is_hit_by_rect ( this->x <= rect->x + rect->width) || (this->x + this->width >= rect->x && this->x + this->width <= + rect->x + rect->width) || + (this->x < rect->x && + this->x + this->width > rect->x + rect->width)) x_hit = 1; if ((this->y >= rect->y && this->y <= rect->y + rect->height) || (this->y + this->height >= rect->y && this->y + this->height <= + rect->y + rect->height) || + (this->y < rect->y && + this->y + this->height > rect->y + rect->height)) y_hit = 1;