version 1.145, 2015/09/14 11:34:50 |
version 1.146, 2015/10/27 15:58:43 |
|
|
w->sx = sx; |
w->sx = sx; |
w->sy = sy; |
w->sy = sy; |
|
|
options_init(&w->options, &global_w_options); |
w->options = options_create(global_w_options); |
|
|
w->references = 0; |
w->references = 0; |
|
|
|
|
w->active = TAILQ_FIRST(&w->panes); |
w->active = TAILQ_FIRST(&w->panes); |
if (name != NULL) { |
if (name != NULL) { |
w->name = xstrdup(name); |
w->name = xstrdup(name); |
options_set_number(&w->options, "automatic-rename", 0); |
options_set_number(w->options, "automatic-rename", 0); |
} else |
} else |
w->name = default_window_name(w); |
w->name = default_window_name(w); |
|
|
|
|
if (event_initialized(&w->alerts_timer)) |
if (event_initialized(&w->alerts_timer)) |
evtimer_del(&w->alerts_timer); |
evtimer_del(&w->alerts_timer); |
|
|
options_free(&w->options); |
options_free(w->options); |
|
|
window_destroy_panes(w); |
window_destroy_panes(w); |
|
|
|
|
* active or inactive pane do not have a custom style, they will need |
* active or inactive pane do not have a custom style, they will need |
* to be redrawn. |
* to be redrawn. |
*/ |
*/ |
agc = options_get_style(&w->options, "window-active-style"); |
agc = options_get_style(w->options, "window-active-style"); |
wgc = options_get_style(&w->options, "window-style"); |
wgc = options_get_style(w->options, "window-style"); |
if (style_equal(agc, wgc)) |
if (style_equal(agc, wgc)) |
return; |
return; |
if (style_equal(&grid_default_cell, &w->active->colgc)) |
if (style_equal(&grid_default_cell, &w->active->colgc)) |
|
|
struct window_pane *wp; |
struct window_pane *wp; |
u_int n; |
u_int n; |
|
|
n = options_get_number(&w->options, "pane-base-index"); |
n = options_get_number(w->options, "pane-base-index"); |
TAILQ_FOREACH(wp, &w->panes, entry) { |
TAILQ_FOREACH(wp, &w->panes, entry) { |
if (n == idx) |
if (n == idx) |
return (wp); |
return (wp); |
|
|
struct window_pane *wq; |
struct window_pane *wq; |
struct window *w = wp->window; |
struct window *w = wp->window; |
|
|
*i = options_get_number(&w->options, "pane-base-index"); |
*i = options_get_number(w->options, "pane-base-index"); |
TAILQ_FOREACH(wq, &w->panes, entry) { |
TAILQ_FOREACH(wq, &w->panes, entry) { |
if (wp == wq) { |
if (wp == wq) { |
return (0); |
return (0); |
|
|
|
|
if (wp->saved_grid != NULL) |
if (wp->saved_grid != NULL) |
return; |
return; |
if (!options_get_number(&wp->window->options, "alternate-screen")) |
if (!options_get_number(wp->window->options, "alternate-screen")) |
return; |
return; |
sx = screen_size_x(s); |
sx = screen_size_x(s); |
sy = screen_size_y(s); |
sy = screen_size_y(s); |
|
|
|
|
if (wp->saved_grid == NULL) |
if (wp->saved_grid == NULL) |
return; |
return; |
if (!options_get_number(&wp->window->options, "alternate-screen")) |
if (!options_get_number(wp->window->options, "alternate-screen")) |
return; |
return; |
sx = screen_size_x(s); |
sx = screen_size_x(s); |
sy = screen_size_y(s); |
sy = screen_size_y(s); |
|
|
|
|
if (KEYC_IS_MOUSE(key)) |
if (KEYC_IS_MOUSE(key)) |
return; |
return; |
if (options_get_number(&wp->window->options, "synchronize-panes")) { |
if (options_get_number(wp->window->options, "synchronize-panes")) { |
TAILQ_FOREACH(wp2, &wp->window->panes, entry) { |
TAILQ_FOREACH(wp2, &wp->window->panes, entry) { |
if (wp2 == wp || wp2->mode != NULL) |
if (wp2 == wp || wp2->mode != NULL) |
continue; |
continue; |