xbattmon

simple battery monitor for X
git clone git://git.2f30.org/xbattmon.git
Log | Files | Refs | README | LICENSE

commit 0744de52c92a1f7e365bc3c32a275fe9953af514
parent 56652159778a861975e04fa81834b7d4ad5627ae
Author: sin <sin@2f30.org>
Date:   Sun Nov  9 20:37:47 +0000

Properly limit thickness if placement is left or right

Diffstat:
xbattmon.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/xbattmon.c b/xbattmon.c @@ -64,8 +64,13 @@ setup(void) width = DisplayWidth(dpy, screen); height = DisplayHeight(dpy, screen); - if (thickness > height) - thickness = height; + if (placement == BOTTOM || placement == TOP) { + if (thickness > height) + thickness = height; + } else { + if (thickness > width) + thickness = width; + } switch (placement) { case BOTTOM: