forked from AuroraMiddleware/gtk
imcontext: Enable font fallback for preedit
Not doing so only invites hexboxes. Fixes: #3678
This commit is contained in:
parent
35488959b4
commit
05fe2441a7
@ -945,7 +945,14 @@ gtk_im_context_simple_get_preedit_string (GtkIMContext *context,
|
||||
|
||||
if (s->len)
|
||||
{
|
||||
PangoAttribute *attr = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE);
|
||||
PangoAttribute *attr;
|
||||
|
||||
attr = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = s->len;
|
||||
pango_attr_list_insert (*attrs, attr);
|
||||
|
||||
attr = pango_attr_fallback_new (TRUE);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = s->len;
|
||||
pango_attr_list_insert (*attrs, attr);
|
||||
|
@ -610,6 +610,9 @@ gtk_im_context_wayland_get_preedit_string (GtkIMContext *context,
|
||||
*attrs = pango_attr_list_new ();
|
||||
pango_attr_list_insert (*attrs,
|
||||
pango_attr_underline_new (PANGO_UNDERLINE_SINGLE));
|
||||
/* enable fallback, since IBus will send us things like ⎄ */
|
||||
pango_attr_list_insert (*attrs,
|
||||
pango_attr_fallback_new (TRUE));
|
||||
if (context_wayland->current_preedit.cursor_begin
|
||||
!= context_wayland->current_preedit.cursor_end)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user