aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authornicm <nicm>2015-10-27 15:58:42 +0000
committernicm <nicm>2015-10-27 15:58:42 +0000
commit44657bf932b068aff5ce1019a4e8a2e7b00b5321 (patch)
tree9efb1fa8a96b0a362a51d894bd36c45aa9731a98 /window.c
parent67c3a014b960b8c1d7931d3c99f570610b1d4d3f (diff)
downloadrtmux-44657bf932b068aff5ce1019a4e8a2e7b00b5321.tar.gz
rtmux-44657bf932b068aff5ce1019a4e8a2e7b00b5321.tar.bz2
rtmux-44657bf932b068aff5ce1019a4e8a2e7b00b5321.zip
Move struct options into options.c.
Diffstat (limited to 'window.c')
-rw-r--r--window.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/window.c b/window.c
index 9e77adcd..baaaa0f8 100644
--- a/window.c
+++ b/window.c
@@ -302,7 +302,7 @@ window_create1(u_int sx, u_int sy)
w->sx = sx;
w->sy = sy;
- options_init(&w->options, &global_w_options);
+ w->options = options_create(global_w_options);
w->references = 0;
@@ -335,7 +335,7 @@ window_create(const char *name, int argc, char **argv, const char *path,
w->active = TAILQ_FIRST(&w->panes);
if (name != NULL) {
w->name = xstrdup(name);
- options_set_number(&w->options, "automatic-rename", 0);
+ options_set_number(w->options, "automatic-rename", 0);
} else
w->name = default_window_name(w);
@@ -359,7 +359,7 @@ window_destroy(struct window *w)
if (event_initialized(&w->alerts_timer))
evtimer_del(&w->alerts_timer);
- options_free(&w->options);
+ options_free(w->options);
window_destroy_panes(w);
@@ -437,8 +437,8 @@ window_redraw_active_switch(struct window *w, struct window_pane *wp)
* active or inactive pane do not have a custom style, they will need
* to be redrawn.
*/
- agc = options_get_style(&w->options, "window-active-style");
- wgc = options_get_style(&w->options, "window-style");
+ agc = options_get_style(w->options, "window-active-style");
+ wgc = options_get_style(w->options, "window-style");
if (style_equal(agc, wgc))
return;
if (style_equal(&grid_default_cell, &w->active->colgc))
@@ -598,7 +598,7 @@ window_pane_at_index(struct window *w, u_int idx)
struct window_pane *wp;
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) {
if (n == idx)
return (wp);
@@ -636,7 +636,7 @@ window_pane_index(struct window_pane *wp, u_int *i)
struct window_pane *wq;
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) {
if (wp == wq) {
return (0);
@@ -1002,7 +1002,7 @@ window_pane_alternate_on(struct window_pane *wp, struct grid_cell *gc,
if (wp->saved_grid != NULL)
return;
- if (!options_get_number(&wp->window->options, "alternate-screen"))
+ if (!options_get_number(wp->window->options, "alternate-screen"))
return;
sx = screen_size_x(s);
sy = screen_size_y(s);
@@ -1032,7 +1032,7 @@ window_pane_alternate_off(struct window_pane *wp, struct grid_cell *gc,
if (wp->saved_grid == NULL)
return;
- if (!options_get_number(&wp->window->options, "alternate-screen"))
+ if (!options_get_number(wp->window->options, "alternate-screen"))
return;
sx = screen_size_x(s);
sy = screen_size_y(s);
@@ -1120,7 +1120,7 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
if (KEYC_IS_MOUSE(key))
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) {
if (wp2 == wp || wp2->mode != NULL)
continue;