mirror of
https://github.com/swaywm/sway.git
synced 2026-03-13 05:34:04 -04:00
Apply suggestions from code review
Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
parent
1308fda50b
commit
8f8f34df69
1 changed files with 2 additions and 2 deletions
|
|
@ -335,8 +335,8 @@ static bool is_in_hotspot(struct swaybar_dbusmenu_hotspot *hotspot, int x, int y
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hotspot->x <= x && x < hotspot->x + hotspot->width && hotspot->y <= y &&
|
if (hotspot->x <= x && x - hotspot->x < hotspot->width && hotspot->y <= y &&
|
||||||
y < hotspot->y + hotspot->height) {
|
y - hotspot->y < hotspot->height) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue