aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-22 11:25:07 +0200
committerGitHub <noreply@github.com>2018-09-22 11:25:07 +0200
commitb148da848ae9075822cd8ddd743532f3ce78f923 (patch)
tree0f0e3cf936553aeb28f39c5506eb94b8abcadc8f /sway
parentfe7e66407cd7339eb4a91558d745a9b214e5cea9 (diff)
parent2f3650282802a01075f772df0663f170fecca29c (diff)
Merge pull request #2679 from RyanDwyer/fix-pango-escaping
Fix pango escaping and refactor escape_markup_text
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/view.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 4398f518..f61f5c84 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -785,14 +785,9 @@ static size_t parse_title_format(struct sway_view *view, char *buffer) {
}
static char *escape_title(char *buffer) {
- int length = escape_markup_text(buffer, NULL, 0);
+ size_t length = escape_markup_text(buffer, NULL);
char *escaped_title = calloc(length + 1, sizeof(char));
- int result = escape_markup_text(buffer, escaped_title, length);
- if (result != length) {
- wlr_log(WLR_ERROR, "Could not escape title: %s", buffer);
- free(escaped_title);
- return buffer;
- }
+ escape_markup_text(buffer, escaped_title);
free(buffer);
return escaped_title;
}