ref: f637e7de9dc3c1bb8e90590ab2956fe9d86a2d02
parent: 788b43acc54ce8cc74681750f708c9044bfa2b72
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Nov 25 05:33:23 EST 2020
fix vertical resizing
--- a/bar.c
+++ b/bar.c
@@ -71,9 +71,9 @@
if(ow != w || oh != h){
if(pos[0] == 't' || pos[1] == 't'){
miny = 0;
- maxy = 3*f->height;
+ maxy = Borderwidth+3*f->height+Borderwidth;
}else{
- miny = h - 3*f->height;
+ miny = h - (Borderwidth+3*f->height+Borderwidth);
maxy = h;
}
if(pos[0] == 'l' || pos[1] == 'l'){
@@ -83,7 +83,9 @@
minx = MAX(100, w-(Borderwidth+Off+width+Off+Borderwidth));
maxx = w;
}
- fprint(wctl, "resize -r %d %d %d %d", minx, miny, maxx, maxy);
+ snprint(t, sizeof(t), "resize -r %d %d %d %d", minx, miny, maxx, maxy);
+ if(fprint(wctl, "%s", t) < 0)
+ fprint(2, "%s: %r\n", t);
ow = w;
oh = h;
}