diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2017-04-24 12:18:05 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2017-04-24 12:18:05 +0000 |
commit | 60b34864abe23dc6c9a8b61bf36af42ae58994fb (patch) | |
tree | c25f5585fbd15e8bf6efcc89b8a2a645c34af6f6 /app/cwm | |
parent | b08b4a6d7790288c99f49918dba9919e9b494457 (diff) |
For {h,v}tile, instead of keeping the master client's {h,v} geometry, expand it
to %50 of the area, then fill in the remaining space with the other clients in
the same group; from Gerrit Meyerheim.
support from ajacoutot.
Diffstat (limited to 'app/cwm')
-rw-r--r-- | app/cwm/client.c | 4 | ||||
-rw-r--r-- | app/cwm/cwmrc.5 | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c index a05b1e8c5..109fc43b9 100644 --- a/app/cwm/client.c +++ b/app/cwm/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.234 2017/02/06 18:10:28 okan Exp $ + * $OpenBSD: client.c,v 1.235 2017/04/24 12:18:04 okan Exp $ */ #include <sys/types.h> @@ -982,6 +982,7 @@ client_htile(struct client_ctx *cc) cc->flags &= ~CLIENT_HMAXIMIZED; cc->geom.x = area.x; cc->geom.y = area.y; + cc->geom.h = (area.h - (cc->bwidth * 2)) / 2; cc->geom.w = area.w - (cc->bwidth * 2); client_resize(cc, 1); client_ptrwarp(cc); @@ -1042,6 +1043,7 @@ client_vtile(struct client_ctx *cc) cc->geom.x = area.x; cc->geom.y = area.y; cc->geom.h = area.h - (cc->bwidth * 2); + cc->geom.w = (area.w - (cc->bwidth * 2)) / 2; client_resize(cc, 1); client_ptrwarp(cc); diff --git a/app/cwm/cwmrc.5 b/app/cwm/cwmrc.5 index fbecaedbc..0462f94bb 100644 --- a/app/cwm/cwmrc.5 +++ b/app/cwm/cwmrc.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cwmrc.5,v 1.66 2017/01/15 21:07:44 okan Exp $ +.\" $OpenBSD: cwmrc.5,v 1.67 2017/04/24 12:18:04 okan Exp $ .\" .\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 15 2017 $ +.Dd $Mdocdate: April 24 2017 $ .Dt CWMRC 5 .Os .Sh NAME @@ -324,11 +324,13 @@ Vertically maximize current window (gap + border honored). .It window-hmaximize Horizontally maximize current window (gap + border honored). .It window-htile -Current window is placed at the top of the screen and maximized -horizontally, other windows in its group share remaining screen space. +Current window is placed at the top of the screen, maximized +horizontally and resized to half of the vertical screen space. Other +windows in its group share remaining screen space. .It window-vtile -Current window is placed on the left of the screen and maximized -vertically, other windows in its group share remaining screen space. +Current window is placed on the left of the screen, maximized vertically +and resized to half of the horizontal screen space. Other windows in its +group share remaining screen space. .It window-move Move current window. .It window-resize |