version 1.19, 2017/02/03 11:57:27 |
version 1.20, 2017/03/08 13:36:12 |
|
|
{ |
{ |
struct client *c; |
struct client *c; |
struct session *s; |
struct session *s; |
struct format_tree *ft; |
|
struct winlink *wl; |
struct winlink *wl; |
const char *template; |
const char *template; |
char *expanded; |
char *cp; |
|
|
template = "%layout-change #{window_id} #{window_layout} " |
template = "%layout-change #{window_id} #{window_layout} " |
"#{window_visible_layout} #{window_flags}"; |
"#{window_visible_layout} #{window_flags}"; |
|
|
if (w->layout_root == NULL) |
if (w->layout_root == NULL) |
continue; |
continue; |
|
|
ft = format_create(NULL, FORMAT_NONE, 0); |
|
wl = winlink_find_by_window(&s->windows, w); |
wl = winlink_find_by_window(&s->windows, w); |
if (wl != NULL) { |
if (wl != NULL) { |
format_defaults(ft, c, NULL, wl, NULL); |
cp = format_single(NULL, template, c, NULL, wl, NULL); |
expanded = format_expand(ft, template); |
control_write(c, "%s", cp); |
control_write(c, "%s", expanded); |
free(cp); |
free(expanded); |
|
} |
} |
format_free(ft); |
|
} |
} |
} |
} |
|
|