Apply suggestions from code review

Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
Giancarlo Razzolini 2024-10-25 15:25:49 -03:00 committed by GitHub
parent 0eb4afc898
commit 19661d1853
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -335,8 +335,8 @@ static bool is_in_hotspot(struct swaybar_dbusmenu_hotspot *hotspot, int x, int y
return false;
}
if (hotspot->x <= x && x < hotspot->x + hotspot->width && hotspot->y <= y &&
y < hotspot->y + hotspot->height) {
if (hotspot->x <= x && x - hotspot->x < hotspot->width && hotspot->y <= y &&
y - hotspot->y < hotspot->height) {
return true;
}