Hi,
Sorry to thread-dig here, but I've had trouble with dmenu recently and
traced it to this patch. The XCreateWindow call would fail because mw
would be zero. I'm unsure why, but this problem only happened when
Firefox or OpenOffice were focussed. Anyway, I've sorted it, the patch
caused dmenu to access past the end of the info array and a quick bounds
check fixes it.
Thanks, Rob.
diff -r d0f5c7885a5a dmenu.c
--- a/dmenu.c Sun May 08 15:15:24 2011 +0100
+++ b/dmenu.c Wed May 11 02:46:22 2011 +0100
@@ -515,6 +515,8 @@
if((monitor == info[i].screen_number)
|| (monitor < 0 && INRECT(x, y, info[i].x_org, info[i].y_org,
info[i].width, info[i].height)))
break;
+ if(i >= n)
+ i = n - 1;
x = info[i].x_org;
y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
mw = info[i].width;
Received on Wed May 11 2011 - 13:01:21 CEST
This archive was generated by hypermail 2.2.0 : Wed May 11 2011 - 13:12:03 CEST