From c258d0a0faf82e6f19a95f2c269aed2484eaa3ab Mon Sep 17 00:00:00 2001 From: rootcoma Date: Fri, 8 Aug 2014 08:06:33 -0700 Subject: [PATCH] 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. --- bar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bar.c b/bar.c index 3fed67e..43b8007 100644 --- a/bar.c +++ b/bar.c @@ -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; }