aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xfns.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c
index bade5b56765..2f832cfed61 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -44,7 +44,7 @@ extern void abort ();
44/* On some systems, the character-composition stuff is broken in X11R5. */ 44/* On some systems, the character-composition stuff is broken in X11R5. */
45#if defined (HAVE_X11R5) && ! defined (HAVE_X11R6) 45#if defined (HAVE_X11R5) && ! defined (HAVE_X11R6)
46#ifdef X11R5_INHIBIT_I18N 46#ifdef X11R5_INHIBIT_I18N
47#undef HAVE_X_I18N 47#define X_I18N_INHIBITED
48#endif 48#endif
49#endif 49#endif
50 50
@@ -2656,6 +2656,7 @@ x_window (f, window_prompting, minibuffer_only)
2656 XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints); 2656 XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints);
2657 2657
2658#ifdef HAVE_X_I18N 2658#ifdef HAVE_X_I18N
2659#ifndef X_I18N_INHIBITED
2659 { 2660 {
2660 XIM xim; 2661 XIM xim;
2661 XIC xic = NULL; 2662 XIC xic = NULL;
@@ -2671,11 +2672,19 @@ x_window (f, window_prompting, minibuffer_only)
2671 NULL); 2672 NULL);
2672 2673
2673 if (xic == 0) 2674 if (xic == 0)
2674 XCloseIM (xim); 2675 {
2676 XCloseIM (xim);
2677 xim = NULL;
2678 }
2675 } 2679 }
2680 FRAME_XIM (f) = xim;
2676 FRAME_XIC (f) = xic; 2681 FRAME_XIC (f) = xic;
2677 } 2682 }
2678#endif 2683#else /* X_I18N_INHIBITED */
2684 FRAME_XIM (f) = 0;
2685 FRAME_XIC (f) = 0;
2686#endif /* X_I18N_INHIBITED */
2687#endif /* HAVE_X_I18N */
2679 2688
2680 f->output_data.x->wm_hints.input = True; 2689 f->output_data.x->wm_hints.input = True;
2681 f->output_data.x->wm_hints.flags |= InputHint; 2690 f->output_data.x->wm_hints.flags |= InputHint;
@@ -2769,6 +2778,7 @@ x_window (f)
2769 FRAME_X_DISPLAY_INFO (f)->visual, 2778 FRAME_X_DISPLAY_INFO (f)->visual,
2770 attribute_mask, &attributes); 2779 attribute_mask, &attributes);
2771#ifdef HAVE_X_I18N 2780#ifdef HAVE_X_I18N
2781#ifndef X_I18N_INHIBITED
2772 { 2782 {
2773 XIM xim; 2783 XIM xim;
2774 XIC xic = NULL; 2784 XIC xic = NULL;
@@ -2784,12 +2794,20 @@ x_window (f)
2784 NULL); 2794 NULL);
2785 2795
2786 if (!xic) 2796 if (!xic)
2787 XCloseIM (xim); 2797 {
2798 XCloseIM (xim);
2799 xim = NULL;
2800 }
2788 } 2801 }
2789 2802
2803 FRAME_XIM (f) = xim;
2790 FRAME_XIC (f) = xic; 2804 FRAME_XIC (f) = xic;
2791 } 2805 }
2792#endif 2806#else /* X_I18N_INHIBITED */
2807 FRAME_XIM (f) = 0;
2808 FRAME_XIC (f) = 0;
2809#endif /* X_I18N_INHIBITED */
2810#endif /* HAVE_X_I18N */
2793 2811
2794 validate_x_resource_name (); 2812 validate_x_resource_name ();
2795 2813