version 1.21, 2009/08/14 11:23:34 |
version 1.22, 2009/08/18 21:14:24 |
|
|
server_check_window(struct window *w) |
server_check_window(struct window *w) |
{ |
{ |
struct window_pane *wp, *wq; |
struct window_pane *wp, *wq; |
|
struct options *oo = &w->options; |
struct client *c; |
struct client *c; |
struct session *s; |
struct session *s; |
struct winlink *wl; |
struct winlink *wl; |
u_int i, j; |
u_int i, j; |
int destroyed, flag; |
int destroyed; |
|
|
flag = options_get_number(&w->options, "remain-on-exit"); |
|
|
|
destroyed = 1; |
destroyed = 1; |
|
|
wp = TAILQ_FIRST(&w->panes); |
wp = TAILQ_FIRST(&w->panes); |
|
|
* the window to be destroyed (or it'll close when the last |
* the window to be destroyed (or it'll close when the last |
* pane dies). |
* pane dies). |
*/ |
*/ |
if (wp->fd == -1 && !flag) { |
if (wp->fd == -1 && options_get_number(oo, "remain-on-exit")) { |
layout_close_pane(wp); |
layout_close_pane(wp); |
window_remove_pane(w, wp); |
window_remove_pane(w, wp); |
server_redraw_window(w); |
server_redraw_window(w); |