Merge pull request #78 from rootcoma/fix_click_area

Fix the bounds checking for area_get.
This commit is contained in:
Giuseppe 2014-08-27 10:24:08 +02:00
commit e9cdee9701
1 changed files with 1 additions and 1 deletions

2
bar.c
View File

@ -224,7 +224,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;
}