diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 3ec58a5d..3746ad81 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -348,7 +348,7 @@ struct sway_container *container_view_create(struct sway_container *sibling, | |||
348 | swayc, title, sibling, sibling ? sibling->type : 0, sibling->name); | 348 | swayc, title, sibling, sibling ? sibling->type : 0, sibling->name); |
349 | // Setup values | 349 | // Setup values |
350 | swayc->sway_view = sway_view; | 350 | swayc->sway_view = sway_view; |
351 | container_update_title(swayc, title ? title : ""); | 351 | container_update_title(swayc, title); |
352 | swayc->width = 0; | 352 | swayc->width = 0; |
353 | swayc->height = 0; | 353 | swayc->height = 0; |
354 | 354 | ||
@@ -660,9 +660,14 @@ static void container_notify_child_title_changed( | |||
660 | 660 | ||
661 | void container_update_title(struct sway_container *container, | 661 | void container_update_title(struct sway_container *container, |
662 | const char *new_title) { | 662 | const char *new_title) { |
663 | if (!new_title) { | ||
664 | new_title = ""; | ||
665 | } | ||
666 | |||
663 | if (container->name && strcmp(container->name, new_title) == 0) { | 667 | if (container->name && strcmp(container->name, new_title) == 0) { |
664 | return; | 668 | return; |
665 | } | 669 | } |
670 | |||
666 | if (container->name) { | 671 | if (container->name) { |
667 | free(container->name); | 672 | free(container->name); |
668 | } | 673 | } |