From 19661d1853e766f28ac44284383ff2ee49bf53ae Mon Sep 17 00:00:00 2001 From: Giancarlo Razzolini Date: Fri, 25 Oct 2024 15:25:49 -0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Demi Marie Obenour --- swaybar/tray/dbusmenu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swaybar/tray/dbusmenu.c b/swaybar/tray/dbusmenu.c index 6f8f6b61..63d94d9c 100644 --- a/swaybar/tray/dbusmenu.c +++ b/swaybar/tray/dbusmenu.c @@ -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; }