summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2009-12-07 19:48:08 +0000
committerokan <okan>2009-12-07 19:48:08 +0000
commit46630531f876c8043756e6622ca8be9e578bb2fa (patch)
treed2fab75f11d3fac9cf7a8f7aafcdf5adcf72224a
parentab4d36531c79b466e69d7dbd90329d58b8dce7ca (diff)
downloadcwm-46630531f876c8043756e6622ca8be9e578bb2fa.tar.gz
cwm-46630531f876c8043756e6622ca8be9e578bb2fa.tar.xz
cwm-46630531f876c8043756e6622ca8be9e578bb2fa.zip
fix off-by-one where a mere click would select the first item inside a menu
from Thomas Pfaff

ok oga@
-rw-r--r--menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index 83be09b..2d02a64 100644
--- a/menu.c
+++ b/menu.c
@@ -398,7 +398,7 @@ menu_calc_entry(struct screen_ctx *sc, struct menu_ctx *mc, int x, int y)
 	entry = y / font_height();
 
 	/* in bounds? */
-	if (x < 0 || x > mc->width || y < 0 || y > font_height() * mc->num ||
+	if (x <= 0 || x > mc->width || y <= 0 || y > font_height() * mc->num ||
 	    entry < 0 || entry >= mc->num)
 		entry = -1;