X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Finput-method-xlib.c;h=cb8a9b07c4d3c2ec8a576dc42d62aeca4e7ece5b;hb=7ad5ec6e0fe1f80d8abf86827401ba45f68f5288;hp=56d2dacac4dcdb039d93fbeb8f2a86c637937fad;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/src/input-method-xlib.c b/src/input-method-xlib.c index 56d2dac..cb8a9b0 100644 --- a/src/input-method-xlib.c +++ b/src/input-method-xlib.c @@ -79,7 +79,12 @@ Initialize_Locale (void) { char *locale; - XtSetLanguageProc (NULL, (XtLanguageProc) NULL, NULL); + /* dverna - Nov. 98: ### DON'T DO THIS !!! The default XtLanguageProc + routine calls setlocale(LC_ALL, lang) which fucks up our lower-level + locale management, and especially the value of LC_NUMERIC. Anyway, since + at this point, we don't know yet whether we're gonna need an X11 frame, + we should really do it manually and not use Xlib's dumb default routine */ + /*XtSetLanguageProc (NULL, (XtLanguageProc) NULL, NULL);*/ if ((locale = setlocale (LC_ALL, "")) == NULL) { stderr_out ("Can't set locale.\n"); @@ -182,10 +187,10 @@ XIM_init_frame (struct frame *f) static XtResource resources[] = { /* name class represent'n field default value */ - res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, DefaultXIMStyles), - res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, XtDefaultFontSet), - res(XtNximForeground, XtCForeground, XtRPixel, fg, XtDefaultForeground), - res(XtNximBackground, XtCBackground, XtRPixel, bg, XtDefaultBackground) + res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, (XtPointer) DefaultXIMStyles), + res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, (XtPointer) XtDefaultFontSet), + res(XtNximForeground, XtCForeground, XtRPixel, fg, (XtPointer) XtDefaultForeground), + res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground) }; assert (win != 0 && w != NULL && d != NULL); @@ -380,14 +385,14 @@ get_XIM_input (XKeyPressedEvent *x_key_event, XIC ic, Display *dpy) int i; XClientMessageEvent new_event; -try_again: +retry: len = XwcLookupString (ic, x_key_event, composed_input_buf.data, composed_input_buf.size, &keysym, &status); switch (status) { case XBufferOverflow: /* GROW_WC_STRING (&composed_input_buf, 32); mrb */ - goto try_again; + goto retry; case XLookupChars: break; default: