From b6450b167b089201381f02e1919f18df8881e082 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 1 Apr 2009 18:21:42 +0000 Subject: Basic horizontal splitting and layout management. Still some redraw and other issues - particularly, don't mix with manual pane resizing and be careful when viewing from multiple clients; generally cycling the layout a few times will fix most problems. Getting this in for testing while I think about how to deal with manual mode. Split window as normal and cycle the layouts with C-b space. Some of the layouts will work better when swap-pane comes along. --- window.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index 10637767..55019e13 100644 --- a/window.c +++ b/window.c @@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.70 2009-03-07 09:29:54 nicm Exp $ */ +/* $Id: window.c,v 1.71 2009-04-01 18:21:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -212,6 +212,7 @@ window_create1(u_int sx, u_int sy) TAILQ_INIT(&w->panes); w->active = NULL; + w->layout = 0; w->sx = sx; w->sy = sy; @@ -375,6 +376,7 @@ window_update_panes(struct window *w) TAILQ_FOREACH(wp, &w->panes, entry) { if (wp->flags & PANE_HIDDEN) continue; + wp->xoff = 0; wp->yoff = yoff; yoff += wp->sy + 1; } @@ -512,11 +514,12 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit) wp->mode = NULL; + wp->xoff = 0; + wp->yoff = 0; + wp->sx = sx; wp->sy = sy; - wp->yoff = 0; - screen_init(&wp->base, sx, sy, hlimit); wp->screen = &wp->base; -- cgit