This is only relevant if your Emacs is built with XIM support. It
might be useful to turn off XIM on slow X client/server links.
+@item @code{inputStyle} (class @code{InputStyle})
+@cindex inputStyle (X resource)
+@cindex input method style, X
+This resource controls how preview text generated by X input methods
+is displayed. If its value is @samp{callback}, input methods will
+direct Emacs to display the contents of their preview text in the
+current buffer.
+
+If it is @samp{offthespot}, input methods will display their preview
+text inside a separate area of the display provided by Emacs.
+
+If it is @samp{overthespot}, input methods will display their preview
+text inside a popup window at the location of the point in the current
+window.
+
+If it is @samp{root}, input methods will display their preview text
+inside a portion of the display specific to each input method.
+
@item @code{verticalScrollBars} (class @code{ScrollBars})
Give frames scroll bars on the left if @samp{left}, on the right if
@samp{right}; don't have scroll bars if @samp{off} (@pxref{Scroll Bars}).
This controls the thickness of the external borders of the menu bars
and pop-up menus.
++++
+** New X resource: "inputStyle".
+This controls the style of the pre-edit and status areas of X input
+methods.
+
---
** New minor mode 'pixel-scroll-precision-mode'.
When enabled, and if your mouse supports it, you can scroll the
/* Create XIC for frame F. */
-
-#define STYLE_OFFTHESPOT (XIMPreeditArea | XIMStatusArea)
-#define STYLE_OVERTHESPOT (XIMPreeditPosition | XIMStatusNothing)
-#define STYLE_ROOT (XIMPreeditNothing | XIMStatusNothing)
-#define STYLE_CALLBACK (XIMPreeditCallbacks | XIMStatusNothing)
-#define STYLE_NONE (XIMPreeditNothing | XIMStatusNothing)
-
static const XIMStyle supported_xim_styles[] =
{
STYLE_CALLBACK,
input method XIM. */
static XIMStyle
-best_xim_style (XIMStyles *xim)
+best_xim_style (struct x_display_info *dpyinfo,
+ XIMStyles *xim)
{
int i, j;
int nr_supported = ARRAYELTS (supported_xim_styles);
+ if (dpyinfo->preferred_xim_style)
+ {
+ for (j = 0; j < xim->count_styles; ++j)
+ if (dpyinfo->preferred_xim_style == xim->supported_styles[j])
+ return dpyinfo->preferred_xim_style;
+ }
+
for (i = 0; i < nr_supported; ++i)
for (j = 0; j < xim->count_styles; ++j)
if (supported_xim_styles[i] == xim->supported_styles[j])
goto out;
/* Determine XIC style. */
- xic_style = best_xim_style (FRAME_X_XIM_STYLES (f));
+ xic_style = best_xim_style (FRAME_DISPLAY_INFO (f),
+ FRAME_X_XIM_STYLES (f));
/* Create X fontset. */
if (xic_style & (XIMPreeditPosition | XIMStatusArea))
#endif
}
+ {
+ AUTO_STRING (inputStyle, "inputStyle");
+ AUTO_STRING (InputStyle, "InputStyle");
+ Lisp_Object value = gui_display_get_resource (dpyinfo, inputStyle, InputStyle,
+ Qnil, Qnil);
+
+#ifdef HAVE_X_I18N
+ if (STRINGP (value))
+ {
+ if (!strcmp (SSDATA (value), "callback"))
+ dpyinfo->preferred_xim_style = STYLE_CALLBACK;
+ else if (!strcmp (SSDATA (value), "none"))
+ dpyinfo->preferred_xim_style = STYLE_NONE;
+ else if (!strcmp (SSDATA (value), "overthespot"))
+ dpyinfo->preferred_xim_style = STYLE_OVERTHESPOT;
+ else if (!strcmp (SSDATA (value), "offthespot"))
+ dpyinfo->preferred_xim_style = STYLE_OFFTHESPOT;
+ else if (!strcmp (SSDATA (value), "root"))
+ dpyinfo->preferred_xim_style = STYLE_ROOT;
+ }
+#endif
+ }
+
#ifdef HAVE_X_SM
/* Only do this for the very first display in the Emacs session.
Ignore X session management when Emacs was first started on a
XIM xim;
XIMStyles *xim_styles;
struct xim_inst_t *xim_callback_data;
+ XIMStyle preferred_xim_style;
#endif
/* A cache mapping color names to RGB values. */
extern void x_session_close (void);
#endif
+#ifdef HAVE_X_I18N
+#define STYLE_OFFTHESPOT (XIMPreeditArea | XIMStatusArea)
+#define STYLE_OVERTHESPOT (XIMPreeditPosition | XIMStatusNothing)
+#define STYLE_ROOT (XIMPreeditNothing | XIMStatusNothing)
+#define STYLE_CALLBACK (XIMPreeditCallbacks | XIMStatusNothing)
+#define STYLE_NONE (XIMPreeditNothing | XIMStatusNothing)
+#endif
/* Is the frame embedded into another application? */