aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2020-04-16 13:32:35 +0000
committerWynn Wolf Arbor2020-04-18 21:10:54 +0200
commit23c5b2e81239675802d7cfe1b1572d89620f7485 (patch)
tree9bbfab1efe388cccad725ac60c01c85ae78a9e35 /client.c
parent15fd9c391223d87228a49ec13ae4051bee4c0a55 (diff)
downloadcwm-23c5b2e81239675802d7cfe1b1572d89620f7485.tar.gz
Allow configuring a percentage window size of the master window during htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
Diffstat (limited to '')
-rw-r--r--client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/client.c b/client.c
index ffb1ed1..bea1dba 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.262 2020/03/24 14:47:29 okan Exp $
+ * $OpenBSD: client.c,v 1.263 2020/04/16 13:32:35 okan Exp $
*/
#include <sys/types.h>
@@ -940,7 +940,8 @@ client_htile(struct client_ctx *cc)
cc->geom.x = area.x;
cc->geom.y = area.y;
cc->geom.w = area.w - (cc->bwidth * 2);
- cc->geom.h = (area.h - (cc->bwidth * 2)) / 2;
+ if (Conf.htile > 0)
+ cc->geom.h = ((area.h - (cc->bwidth * 2)) * Conf.htile) / 100;
client_resize(cc, 1);
client_ptr_warp(cc);
@@ -1007,7 +1008,8 @@ client_vtile(struct client_ctx *cc)
cc->flags &= ~CLIENT_VMAXIMIZED;
cc->geom.x = area.x;
cc->geom.y = area.y;
- cc->geom.w = (area.w - (cc->bwidth * 2)) / 2;
+ if (Conf.vtile > 0)
+ cc->geom.w = ((area.w - (cc->bwidth * 2)) * Conf.vtile) / 100;
cc->geom.h = area.h - (cc->bwidth * 2);
client_resize(cc, 1);
client_ptr_warp(cc);