diff options
-rw-r--r-- | sway/tree/container.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 5c1f42c2..5d88325f 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -784,23 +784,32 @@ static size_t concatenate_child_titles(struct sway_container *parent, | |||
784 | strcpy(buffer, "F["); | 784 | strcpy(buffer, "F["); |
785 | break; | 785 | break; |
786 | case L_NONE: | 786 | case L_NONE: |
787 | strcpy(buffer, "?["); | 787 | strcpy(buffer, "D["); |
788 | break; | 788 | break; |
789 | } | 789 | } |
790 | } | 790 | } |
791 | 791 | ||
792 | for (int i = 0; i < parent->children->length; ++i) { | 792 | for (int i = 0; i < parent->children->length; ++i) { |
793 | if (i != 0) { | 793 | if (i != 0) { |
794 | len += 2; | 794 | len += 1; |
795 | if (buffer) { | 795 | if (buffer) { |
796 | strcat(buffer, ", "); | 796 | strcat(buffer, " "); |
797 | } | 797 | } |
798 | } | 798 | } |
799 | struct sway_container *child = parent->children->items[i]; | 799 | struct sway_container *child = parent->children->items[i]; |
800 | if (child->name) { | 800 | const char *identifier = NULL; |
801 | len += strlen(child->name); | 801 | if (child->type == C_VIEW) { |
802 | identifier = view_get_class(child->sway_view); | ||
803 | if (!identifier) { | ||
804 | identifier = view_get_app_id(child->sway_view); | ||
805 | } | ||
806 | } else { | ||
807 | identifier = child->name; | ||
808 | } | ||
809 | if (identifier) { | ||
810 | len += strlen(identifier); | ||
802 | if (buffer) { | 811 | if (buffer) { |
803 | strcat(buffer, child->name); | 812 | strcat(buffer, identifier); |
804 | } | 813 | } |
805 | } else { | 814 | } else { |
806 | len += 6; | 815 | len += 6; |