diff options
| author | Richard M. Stallman | 1995-10-15 15:17:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-15 15:17:33 +0000 |
| commit | 64d16748b3fde50cac1f7ec42b7b948d5f15ae55 (patch) | |
| tree | dabd6c4cae45c02d474278cfdf3b2fc0bb5076ae /src | |
| parent | 7b8d4a3fb5c248f39afab0d76535b48ccd2a5bcd (diff) | |
| download | emacs-64d16748b3fde50cac1f7ec42b7b948d5f15ae55.tar.gz emacs-64d16748b3fde50cac1f7ec42b7b948d5f15ae55.zip | |
(x_window, both versions): Add HAVE_X_I18N support.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 44 |
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) | |||
| 2581 | class_hints.res_class = EMACS_CLASS; | 2581 | class_hints.res_class = EMACS_CLASS; |
| 2582 | XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints); | 2582 | XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints); |
| 2583 | 2583 | ||
| 2584 | #ifdef HAVE_X_I18N | ||
| 2585 | { | ||
| 2586 | XIM xim; | ||
| 2587 | XIC xic = NULL; | ||
| 2588 | |||
| 2589 | xim = XOpenIM (FRAME_X_DISPLAY (f), NULL, NULL, NULL); | ||
| 2590 | |||
| 2591 | if (xim) | ||
| 2592 | { | ||
| 2593 | xic = XCreateIC (xim, | ||
| 2594 | XNInputStyle, XIMPreeditNothing | XIMStatusNothing, | ||
| 2595 | XNClientWindow, FRAME_X_WINDOW(f), | ||
| 2596 | XNFocusWindow, FRAME_X_WINDOW(f), | ||
| 2597 | NULL); | ||
| 2598 | |||
| 2599 | if (xic == 0) | ||
| 2600 | XCloseIM (xim); | ||
| 2601 | } | ||
| 2602 | FRAME_XIC (f) = xic; | ||
| 2603 | } | ||
| 2604 | #endif | ||
| 2605 | |||
| 2584 | f->output_data.x->wm_hints.input = True; | 2606 | f->output_data.x->wm_hints.input = True; |
| 2585 | f->output_data.x->wm_hints.flags |= InputHint; | 2607 | f->output_data.x->wm_hints.flags |= InputHint; |
| 2586 | XSetWMHints (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 2608 | XSetWMHints (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| @@ -2672,6 +2694,28 @@ x_window (f) | |||
| 2672 | InputOutput, /* class */ | 2694 | InputOutput, /* class */ |
| 2673 | FRAME_X_DISPLAY_INFO (f)->visual, | 2695 | FRAME_X_DISPLAY_INFO (f)->visual, |
| 2674 | attribute_mask, &attributes); | 2696 | attribute_mask, &attributes); |
| 2697 | #ifdef HAVE_X_I18N | ||
| 2698 | { | ||
| 2699 | XIM xim; | ||
| 2700 | XIC xic = NULL; | ||
| 2701 | |||
| 2702 | xim = XOpenIM (FRAME_X_DISPLAY(f), NULL, NULL, NULL); | ||
| 2703 | |||
| 2704 | if (xim) | ||
| 2705 | { | ||
| 2706 | xic = XCreateIC (xim, | ||
| 2707 | XNInputStyle, XIMPreeditNothing | XIMStatusNothing, | ||
| 2708 | XNClientWindow, FRAME_X_WINDOW(f), | ||
| 2709 | XNFocusWindow, FRAME_X_WINDOW(f), | ||
| 2710 | NULL); | ||
| 2711 | |||
| 2712 | if (!xic) | ||
| 2713 | XCloseIM (xim); | ||
| 2714 | } | ||
| 2715 | |||
| 2716 | FRAME_XIC (f) = xic; | ||
| 2717 | } | ||
| 2718 | #endif | ||
| 2675 | 2719 | ||
| 2676 | validate_x_resource_name (); | 2720 | validate_x_resource_name (); |
| 2677 | 2721 | ||