vcl/unx/gtk3/gtkframe.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 57e0b4344111431e0a26622920b35dfc7d9e8ff8 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Nov 3 10:08:35 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Nov 3 18:18:35 2022 +0100 Related: tdf#149932 honour PANGO_UNDERLINE_NONE for preedit underline at least don't show an underline for PANGO_UNDERLINE_NONE Change-Id: I190f44e1dfb7da1c663ce588973278d0da591c46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142222 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index 33a42787ab4c..d937e8eddd9f 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -5712,8 +5712,12 @@ OUString GtkSalFrame::GetPreeditDetails(GtkIMContext* pIMContext, std::vector<Ex rCursorFlags |= EXTTEXTINPUT_CURSOR_INVISIBLE; break; case PANGO_ATTR_UNDERLINE: - sal_attr |= ExtTextInputAttr::Underline; + { + PangoAttrInt* pango_underline = reinterpret_cast<PangoAttrInt*>(pango_attr); + if (pango_underline->value != PANGO_UNDERLINE_NONE) + sal_attr |= ExtTextInputAttr::Underline; break; + } case PANGO_ATTR_STRIKETHROUGH: sal_attr |= ExtTextInputAttr::RedText; break; @@ -5723,7 +5727,7 @@ OUString GtkSalFrame::GetPreeditDetails(GtkIMContext* pIMContext, std::vector<Ex pango_attribute_destroy (pango_attr); tmp_list = tmp_list->next; } - if (sal_attr == ExtTextInputAttr::NONE) + if (!attr_list) sal_attr |= ExtTextInputAttr::Underline; g_slist_free (attr_list);