commit 0744de52c92a1f7e365bc3c32a275fe9953af514 parent 56652159778a861975e04fa81834b7d4ad5627ae Author: sin <sin@2f30.org> Date: Sun, 9 Nov 2014 20:37:47 +0000 Properly limit thickness if placement is left or right Diffstat:
M | 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: