diff options
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 812d7740..d91182ed 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -107,7 +107,7 @@ uint32_t view_get_window_type(struct sway_view *view) { | |||
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
109 | 109 | ||
110 | const char *view_get_type(struct sway_view *view) { | 110 | const char *view_get_shell(struct sway_view *view) { |
111 | switch(view->type) { | 111 | switch(view->type) { |
112 | case SWAY_VIEW_XDG_SHELL_V6: | 112 | case SWAY_VIEW_XDG_SHELL_V6: |
113 | return "xdg_shell_v6"; | 113 | return "xdg_shell_v6"; |
@@ -654,10 +654,12 @@ static size_t parse_title_format(struct sway_view *view, char *buffer) { | |||
654 | return title ? strlen(title) : 0; | 654 | return title ? strlen(title) : 0; |
655 | } | 655 | } |
656 | const char *title = view_get_title(view); | 656 | const char *title = view_get_title(view); |
657 | const char *app_id = view_get_app_id(view); | ||
657 | const char *class = view_get_class(view); | 658 | const char *class = view_get_class(view); |
658 | const char *instance = view_get_instance(view); | 659 | const char *instance = view_get_instance(view); |
659 | const char *shell = view_get_type(view); | 660 | const char *shell = view_get_shell(view); |
660 | size_t title_len = title ? strlen(title) : 0; | 661 | size_t title_len = title ? strlen(title) : 0; |
662 | size_t app_id_len = app_id ? strlen(app_id) : 0; | ||
661 | size_t class_len = class ? strlen(class) : 0; | 663 | size_t class_len = class ? strlen(class) : 0; |
662 | size_t instance_len = instance ? strlen(instance) : 0; | 664 | size_t instance_len = instance ? strlen(instance) : 0; |
663 | size_t shell_len = shell ? strlen(shell) : 0; | 665 | size_t shell_len = shell ? strlen(shell) : 0; |
@@ -675,6 +677,10 @@ static size_t parse_title_format(struct sway_view *view, char *buffer) { | |||
675 | lenient_strcat(buffer, title); | 677 | lenient_strcat(buffer, title); |
676 | len += title_len; | 678 | len += title_len; |
677 | format += 6; | 679 | format += 6; |
680 | } else if (strncmp(next, "%app_id", 7) == 0) { | ||
681 | lenient_strcat(buffer, app_id); | ||
682 | len += app_id_len; | ||
683 | format += 7; | ||
678 | } else if (strncmp(next, "%class", 6) == 0) { | 684 | } else if (strncmp(next, "%class", 6) == 0) { |
679 | lenient_strcat(buffer, class); | 685 | lenient_strcat(buffer, class); |
680 | len += class_len; | 686 | len += class_len; |