Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Titlebar empty if title contains & #2674

Closed
emersion opened this issue Sep 19, 2018 · 0 comments
Closed

Titlebar empty if title contains & #2674

emersion opened this issue Sep 19, 2018 · 0 comments
Labels
bug Not working as intended

Comments

@emersion
Copy link
Member

  1. Go to https://lists.sr.ht/%7Eemersion/public-inbox/%3C20180919121501.7693-1-sir%40cmpwn.com%3E
  2. Titlebar is empty

Pango markup probably fails to parse input.

@emersion emersion added the bug Not working as intended label Sep 19, 2018
RyanDwyer added a commit to RyanDwyer/sway that referenced this issue Sep 21, 2018
Fixes swaywm#2674.

The cause of the issue was in get_pango_layout. When we call
pango_parse_markup, `text` is the escaped string, and the unescaped
string is then computed and written to `buf`. We were then passing the
unescaped string to pango_layout_set_markup, but this function needs the
escaped string. `buf` is not needed and has been removed.

The other part of this PR refactors escape_markup_text to remove the
dest_length argument and removes the -1 return value on error. It now
assumes that you've allocated dest to the correct length.
RyanDwyer added a commit to RyanDwyer/sway that referenced this issue Sep 22, 2018
Fixes swaywm#2674.

The cause of the issue was in get_pango_layout. When we call
pango_parse_markup, `text` is the escaped string, and the unescaped
string is then computed and written to `buf`. We were then passing the
unescaped string to pango_layout_set_markup, but this function needs the
escaped string. `buf` is not needed and has been removed.

The other part of this PR refactors escape_markup_text to remove the
dest_length argument and removes the -1 return value on error. It now
assumes that you've allocated dest to the correct length.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

1 participant