Fix the bounds checking for area_get.

Mouse at far left (x=0) would not be able to click an area that starts at 0.
This commit is contained in:
rootcoma 2014-08-08 08:06:33 -07:00
parent 8475ff4fdb
commit c258d0a0fa

2
bar.c
View File

@ -212,7 +212,7 @@ area_t *
area_get (xcb_window_t win, const int x)
{
for (int i = 0; i < astack.pos; i++)
if (astack.slot[i].window == win && x > astack.slot[i].begin && x < astack.slot[i].end)
if (astack.slot[i].window == win && x >= astack.slot[i].begin && x < astack.slot[i].end)
return &astack.slot[i];
return NULL;
}