static XFontSet xic_create_xfontset (struct frame *);
static XIMStyle best_xim_style (XIMStyles *);
-
-/* Supported XIM styles, ordered by preference. */
-
-static const XIMStyle supported_xim_styles[] =
-{
- XIMPreeditPosition | XIMStatusArea,
- XIMPreeditPosition | XIMStatusNothing,
- XIMPreeditPosition | XIMStatusNone,
- XIMPreeditNothing | XIMStatusArea,
- XIMPreeditNothing | XIMStatusNothing,
- XIMPreeditNothing | XIMStatusNone,
- XIMPreeditNone | XIMStatusArea,
- XIMPreeditNone | XIMStatusNothing,
- XIMPreeditNone | XIMStatusNone,
- 0,
-};
-
-
#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
/* Create an X fontset on frame F with base font name BASE_FONTNAME. */
static XIMStyle
best_xim_style (XIMStyles *xim)
{
- int i, j;
- int nr_supported = ARRAYELTS (supported_xim_styles);
-
- for (i = 0; i < nr_supported; ++i)
- for (j = 0; j < xim->count_styles; ++j)
- if (supported_xim_styles[i] == xim->supported_styles[j])
- return supported_xim_styles[i];
-
- /* Return the default style. */
+ /* Return the default style. This is what GTK3 uses and
+ should work fine with all modern input methods. */
return XIMPreeditNothing | XIMStatusNothing;
}
#ifdef HAVE_X_I18N
if (w == XWINDOW (f->selected_window))
- if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition))
+ if (FRAME_XIC (f))
xic_set_preeditarea (w, x, y);
#endif
}
create_frame_xic (f);
if (FRAME_XIC_STYLE (f) & XIMStatusArea)
xic_set_statusarea (f);
- if (FRAME_XIC_STYLE (f) & XIMPreeditPosition)
- {
- struct window *w = XWINDOW (f->selected_window);
- xic_set_preeditarea (w, w->cursor.x, w->cursor.y);
- }
+ struct window *w = XWINDOW (f->selected_window);
+ xic_set_preeditarea (w, w->cursor.x, w->cursor.y);
}
}