From fe20c0d89ef5b8581c28067496f0f4c545d55ef8 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 14 Jul 2009 07:23:36 +0000 Subject: Get rid of the PANE_HIDDEN flag in favour of a function, and moving the decision for whether or not a pane should be drawn out of the layout code and into the redraw code. This is needed for the new layout design, getting it in now to make that easier to work on. --- cmd-rotate-window.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'cmd-rotate-window.c') diff --git a/cmd-rotate-window.c b/cmd-rotate-window.c index 3f40603a..e730dc59 100644 --- a/cmd-rotate-window.c +++ b/cmd-rotate-window.c @@ -60,7 +60,6 @@ cmd_rotate_window_exec(struct cmd *self, struct cmd_ctx *ctx) struct window *w; struct window_pane *wp, *wp2; u_int sx, sy, xoff, yoff; - int flags; if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL) return (-1); @@ -73,18 +72,13 @@ cmd_rotate_window_exec(struct cmd *self, struct cmd_ctx *ctx) xoff = wp->xoff; yoff = wp->yoff; sx = wp->sx; sy = wp->sy; - flags = wp->flags; TAILQ_FOREACH(wp, &w->panes, entry) { if ((wp2 = TAILQ_NEXT(wp, entry)) == NULL) break; wp->xoff = wp2->xoff; wp->yoff = wp2->yoff; - wp->flags &= ~PANE_HIDDEN; - wp->flags |= wp2->flags & PANE_HIDDEN; window_pane_resize(wp, wp2->sx, wp2->sy); } wp->xoff = xoff; wp->yoff = yoff; - wp->flags &= ~PANE_HIDDEN; - wp->flags |= flags & PANE_HIDDEN; window_pane_resize(wp, sx, sy); if ((wp = TAILQ_PREV(w->active, window_panes, entry)) == NULL) @@ -97,18 +91,13 @@ cmd_rotate_window_exec(struct cmd *self, struct cmd_ctx *ctx) xoff = wp->xoff; yoff = wp->yoff; sx = wp->sx; sy = wp->sy; - flags = wp->flags; TAILQ_FOREACH_REVERSE(wp, &w->panes, window_panes, entry) { if ((wp2 = TAILQ_PREV(wp, window_panes, entry)) == NULL) break; wp->xoff = wp2->xoff; wp->yoff = wp2->yoff; - wp->flags &= ~PANE_HIDDEN; - wp->flags |= wp2->flags & PANE_HIDDEN; window_pane_resize(wp, wp2->sx, wp2->sy); } wp->xoff = xoff; wp->yoff = yoff; - wp->flags &= ~PANE_HIDDEN; - wp->flags |= flags & PANE_HIDDEN; window_pane_resize(wp, sx, sy); if ((wp = TAILQ_NEXT(w->active, entry)) == NULL) -- cgit v1.2.3