summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-15 15:17:33 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-15 15:17:33 +0000
commit79efa23416cf0321322ba4dac23bc44368cf5678 (patch)
treecf61878f6ebe3eef631684f6fddd50bd541f2204 /src
parentdcc02e324d4e7e2ec5c473db110b6c0203214435 (diff)
downloademacs-79efa23416cf0321322ba4dac23bc44368cf5678.tar.gz
(x_window, both versions): Add HAVE_X_I18N support.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index aeabb1001ae..3c85799e800 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2581,6 +2581,28 @@ x_window (f, window_prompting, minibuffer_only)
class_hints.res_class = EMACS_CLASS;
XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints);
+#ifdef HAVE_X_I18N
+ {
+ XIM xim;
+ XIC xic = NULL;
+
+ xim = XOpenIM (FRAME_X_DISPLAY (f), NULL, NULL, NULL);
+
+ if (xim)
+ {
+ xic = XCreateIC (xim,
+ XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
+ XNClientWindow, FRAME_X_WINDOW(f),
+ XNFocusWindow, FRAME_X_WINDOW(f),
+ NULL);
+
+ if (xic == 0)
+ XCloseIM (xim);
+ }
+ FRAME_XIC (f) = xic;
+ }
+#endif
+
f->output_data.x->wm_hints.input = True;
f->output_data.x->wm_hints.flags |= InputHint;
XSetWMHints (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
@@ -2672,6 +2694,28 @@ x_window (f)
InputOutput, /* class */
FRAME_X_DISPLAY_INFO (f)->visual,
attribute_mask, &attributes);
+#ifdef HAVE_X_I18N
+ {
+ XIM xim;
+ XIC xic = NULL;
+
+ xim = XOpenIM (FRAME_X_DISPLAY(f), NULL, NULL, NULL);
+
+ if (xim)
+ {
+ xic = XCreateIC (xim,
+ XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
+ XNClientWindow, FRAME_X_WINDOW(f),
+ XNFocusWindow, FRAME_X_WINDOW(f),
+ NULL);
+
+ if (!xic)
+ XCloseIM (xim);
+ }
+
+ FRAME_XIC (f) = xic;
+ }
+#endif
validate_x_resource_name ();