X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Finput-method-motif.c;h=f51e4e71f8baf914b334d78bc870416fce67e3b4;hb=50c037f1fca5070b3d9fec278f9aee4c0d358b1c;hp=dd951677e2f1bdd68760f9737e9395d2efca609f;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/src/input-method-motif.c b/src/input-method-motif.c index dd95167..f51e4e7 100644 --- a/src/input-method-motif.c +++ b/src/input-method-motif.c @@ -41,7 +41,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"); @@ -89,6 +94,13 @@ XIM_init_device (struct device *d) /* Nothing to do */ } +/* Callback for the deleting frame. */ +static void +XIM_delete_frame (Widget w, XtPointer client_data, XtPointer call_data) +{ + XmImUnregister ((Widget) client_data); +} + void XIM_init_frame (struct frame *f) { @@ -110,9 +122,10 @@ XIM_init_frame (struct frame *f) default face, rather than foreground and background resources, or that the user can use set-frame-parameters to set xic attributes */ -#define res(name, class, representation, field, default_value) \ - { name, class, representation, sizeof(xim_resources.field), \ - XtOffsetOf(xim_resources_t, field), XtRString, default_value } +#define res(name, class, representation, field, default_value) \ + { name, class, representation, sizeof(xim_resources.field), \ + XtOffsetOf(xim_resources_t, field), \ + XtRString, (XtPointer) (default_value) } static XtResource resources[] = { @@ -146,6 +159,8 @@ XIM_init_frame (struct frame *f) NULL); XmFontListEntryFree (&fontlistEntry); + + XtAddCallback (w, XmNdestroyCallback, XIM_delete_frame, (XtPointer) w); } void @@ -156,7 +171,7 @@ XIM_SetGeometry (struct frame *f) void XIM_SetSpotLocation (struct frame *f, int x, int y) { - /* ### FIX: Must make sure spot fits within Preedit Area */ + /* #### FIX: Must make sure spot fits within Preedit Area */ XPoint *spot = &(FRAME_X_XIC_SPOT (f)); if (spot->x == (short) x && spot->y == (short) y)