aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/title_format.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-05 09:33:27 -0400
committerGitHub <noreply@github.com>2018-09-05 09:33:27 -0400
commit610eb946171f782165a20614b2d3318b89273990 (patch)
tree05eec1df1ef48e05b23d273d31143ad32e7632d2 /sway/commands/title_format.c
parentaa2bf98e0442f9bf41a852c2fafee5b0897010a2 (diff)
parentdbf4aa3e33bdee53876c6893b15ac3f224818e7c (diff)
Merge pull request #2540 from RyanDwyer/typesafety
Implement type safe arguments and demote sway_container
Diffstat (limited to 'sway/commands/title_format.c')
-rw-r--r--sway/commands/title_format.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/title_format.c b/sway/commands/title_format.c
index 3d1c578c..c9ffe8fa 100644
--- a/sway/commands/title_format.c
+++ b/sway/commands/title_format.c
@@ -11,13 +11,12 @@ struct cmd_results *cmd_title_format(int argc, char **argv) {
if ((error = checkarg(argc, "title_format", EXPECTED_AT_LEAST, 1))) {
return error;
}
- struct sway_container *container =
- config->handler_context.current_container;
- if (container->type != C_VIEW) {
+ struct sway_container *container = config->handler_context.container;
+ if (!container->view) {
return cmd_results_new(CMD_INVALID, "title_format",
"Only views can have a title_format");
}
- struct sway_view *view = container->sway_view;
+ struct sway_view *view = container->view;
char *format = join_args(argv, argc);
if (view->title_format) {
free(view->title_format);