diff options
author | 2018-04-02 15:30:58 -0400 | |
---|---|---|
committer | 2018-04-02 15:30:58 -0400 | |
commit | a4a241697ae591289d7c14eff972e1ef787216e2 (patch) | |
tree | d82d3c3eba2946670aa634a62d03feb7102f0bf8 /common/pango.c | |
parent | Xwayland unmanaged views aren't views anymore (diff) | |
parent | Merge pull request #1699 from acrisci/seat-fixes (diff) | |
download | sway-a4a241697ae591289d7c14eff972e1ef787216e2.tar.gz sway-a4a241697ae591289d7c14eff972e1ef787216e2.tar.zst sway-a4a241697ae591289d7c14eff972e1ef787216e2.zip |
Merge branch 'wlroots' into view-redesign
Diffstat (limited to 'common/pango.c')
-rw-r--r-- | common/pango.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/pango.c b/common/pango.c index 2ae7883c..658d2876 100644 --- a/common/pango.c +++ b/common/pango.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <stdio.h> | 6 | #include <stdio.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <string.h> | 8 | #include <string.h> |
9 | #include "log.h" | ||
9 | 10 | ||
10 | PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, | 11 | PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, |
11 | const char *text, int32_t scale, bool markup) { | 12 | const char *text, int32_t scale, bool markup) { |
@@ -13,7 +14,13 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, | |||
13 | PangoAttrList *attrs; | 14 | PangoAttrList *attrs; |
14 | if (markup) { | 15 | if (markup) { |
15 | char *buf; | 16 | char *buf; |
16 | pango_parse_markup(text, -1, 0, &attrs, &buf, NULL, NULL); | 17 | GError *error = NULL; |
18 | if (!sway_assert(pango_parse_markup( | ||
19 | text, -1, 0, &attrs, &buf, NULL, &error), | ||
20 | "pango_parse_markup '%s' -> error %s", text, | ||
21 | error ? error->message : NULL)) { | ||
22 | return NULL; | ||
23 | } | ||
17 | pango_layout_set_markup(layout, buf, -1); | 24 | pango_layout_set_markup(layout, buf, -1); |
18 | free(buf); | 25 | free(buf); |
19 | } else { | 26 | } else { |