From: Dave Love Date: Wed, 21 May 2003 22:12:15 +0000 (+0000) Subject: (x_window, x_window): Use use_xim. X-Git-Tag: ttn-vms-21-2-B4~10044 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1576f1ad14ae2b894aaf812262ea2320fe1971c6;p=emacs.git (x_window, x_window): Use use_xim. --- diff --git a/src/xfns.c b/src/xfns.c index 774eff9d3da..f92e2124df0 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2120,7 +2120,7 @@ static XFontSet xic_create_xfontset P_ ((struct frame *, char *)); static XIMStyle best_xim_style P_ ((XIMStyles *, XIMStyles *)); -/* Supported XIM styles, ordered by preferenc. */ +/* Supported XIM styles, ordered by preference. */ static XIMStyle supported_xim_styles[] = { @@ -2578,9 +2578,8 @@ x_window (f, window_prompting, minibuffer_only) #ifdef HAVE_X_I18N FRAME_XIC (f) = NULL; -#ifdef USE_XIM - create_frame_xic (f); -#endif + if (use_xim) + create_frame_xic (f); #endif f->output_data.x->wm_hints.input = True; @@ -2657,31 +2656,32 @@ x_window (f) #ifdef HAVE_X_I18N FRAME_XIC (f) = NULL; -#ifdef USE_XIM - BLOCK_INPUT; - create_frame_xic (f); - if (FRAME_XIC (f)) - { - /* XIM server might require some X events. */ - unsigned long fevent = NoEventMask; - XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); +if (use_xim) + { + BLOCK_INPUT; + create_frame_xic (f); + if (FRAME_XIC (f)) + { + /* XIM server might require some X events. */ + unsigned long fevent = NoEventMask; + XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); - if (fevent != NoEventMask) - { - XSetWindowAttributes attributes; - XWindowAttributes wattr; - unsigned long attribute_mask; - - XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - &wattr); - attributes.event_mask = wattr.your_event_mask | fevent; - attribute_mask = CWEventMask; - XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - attribute_mask, &attributes); - } - } - UNBLOCK_INPUT; -#endif + if (fevent != NoEventMask) + { + XSetWindowAttributes attributes; + XWindowAttributes wattr; + unsigned long attribute_mask; + + XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + &wattr); + attributes.event_mask = wattr.your_event_mask | fevent; + attribute_mask = CWEventMask; + XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + attribute_mask, &attributes); + } + } + UNBLOCK_INPUT; + } #endif } @@ -2721,19 +2721,20 @@ x_window (f) attribute_mask, &attributes); #ifdef HAVE_X_I18N -#ifdef USE_XIM - create_frame_xic (f); - if (FRAME_XIC (f)) + if use_xim { - /* XIM server might require some X events. */ - unsigned long fevent = NoEventMask; - XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); - attributes.event_mask |= fevent; - attribute_mask = CWEventMask; - XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - attribute_mask, &attributes); + create_frame_xic (f); + if (FRAME_XIC (f)) + { + /* XIM server might require some X events. */ + unsigned long fevent = NoEventMask; + XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); + attributes.event_mask |= fevent; + attribute_mask = CWEventMask; + XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + attribute_mask, &attributes); + } } -#endif #endif /* HAVE_X_I18N */ validate_x_resource_name ();