mirror of
https://github.com/swaywm/sway.git
synced 2024-11-24 00:41:28 +00:00
Apply suggestions from code review
Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
parent
0eb4afc898
commit
19661d1853
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue