aboutsummaryrefslogtreecommitdiff
path: root/control-notify.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-03-08 14:01:23 +0000
committerThomas Adam <thomas@xteddy.org>2017-03-08 14:01:23 +0000
commit3ea36830f38eed2d6dad6cb057b3efe772237d5e (patch)
treedad4d842a60527c85e904f63c3e29c596629f4d4 /control-notify.c
parent5d3296c53b820664d50d96b2b926f2c2c1105e97 (diff)
parent6b2009ad725b662853b8e94aee233fabdc5490f9 (diff)
downloadrtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.gz
rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.bz2
rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.zip
Merge branch 'obsd-master'
Diffstat (limited to 'control-notify.c')
-rw-r--r--control-notify.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/control-notify.c b/control-notify.c
index 3b2d32eb..230bce61 100644
--- a/control-notify.c
+++ b/control-notify.c
@@ -64,10 +64,9 @@ control_notify_window_layout_changed(struct window *w)
{
struct client *c;
struct session *s;
- struct format_tree *ft;
struct winlink *wl;
const char *template;
- char *expanded;
+ char *cp;
template = "%layout-change #{window_id} #{window_layout} "
"#{window_visible_layout} #{window_flags}";
@@ -88,15 +87,12 @@ control_notify_window_layout_changed(struct window *w)
if (w->layout_root == NULL)
continue;
- ft = format_create(NULL, FORMAT_NONE, 0);
wl = winlink_find_by_window(&s->windows, w);
if (wl != NULL) {
- format_defaults(ft, c, NULL, wl, NULL);
- expanded = format_expand(ft, template);
- control_write(c, "%s", expanded);
- free(expanded);
+ cp = format_single(NULL, template, c, NULL, wl, NULL);
+ control_write(c, "%s", cp);
+ free(cp);
}
- format_free(ft);
}
}