diff options
author | daryll <daryll> | 2000-07-11 19:36:01 +0000 |
---|---|---|
committer | daryll <daryll> | 2000-07-11 19:36:01 +0000 |
commit | 00b067ea93ac14a94f5d802d9db02d44947f73f4 (patch) | |
tree | a00578ed3529e70e03e84429000c2183b31caf86 /xc/lib/X11/imDefIm.c | |
parent | fd829310d5ed6be595d7a4ec92cfe7aae3907beb (diff) |
Merge the trunk onto the tdfx-2-1 branch. Now up to date with 4.0.1.tdfx-2-1-20000711
Diffstat (limited to 'xc/lib/X11/imDefIm.c')
-rw-r--r-- | xc/lib/X11/imDefIm.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/xc/lib/X11/imDefIm.c b/xc/lib/X11/imDefIm.c index 86a379f24..4b58da348 100644 --- a/xc/lib/X11/imDefIm.c +++ b/xc/lib/X11/imDefIm.c @@ -31,13 +31,14 @@ OF THIS SOFTWARE. makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefIm.c,v 1.3 1999/08/01 07:56:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefIm.c,v 1.4 2000/06/13 02:28:28 dawes Exp $ */ #include <X11/Xatom.h> #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" #include "XlcPublic.h" +#include "XlcPubI.h" #include "XimTrInt.h" #include "Ximint.h" @@ -1036,6 +1037,14 @@ _XimProtoIMFree(im) _XlcCloseConverter(im->private.proto.ctow_conv); im->private.proto.ctow_conv = NULL; } + if (im->private.proto.cstomb_conv) { + _XlcCloseConverter(im->private.proto.cstomb_conv); + im->private.proto.cstomb_conv = NULL; + } + if (im->private.proto.cstowc_conv) { + _XlcCloseConverter(im->private.proto.cstowc_conv); + im->private.proto.cstowc_conv = NULL; + } #ifdef XIM_CONNECTABLE if (!IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im)) { @@ -1602,6 +1611,8 @@ _XimGetEncoding(im, buf, name, name_len, detail, detail_len) int len; XlcConv ctom_conv; XlcConv ctow_conv; + XlcConv conv; + XimProtoPrivateRec *private = &im->private.proto; if (idx == (CARD16)XIM_Default_Encoding_IDX) { /* XXX */ if (!(ctom_conv = _XlcOpenConverter(lcd, @@ -1639,8 +1650,19 @@ _XimGetEncoding(im, buf, name, name_len, detail, detail_len) } else { return False; } - im->private.proto.ctom_conv = ctom_conv; - im->private.proto.ctow_conv = ctow_conv; + + private->ctom_conv = ctom_conv; + private->ctow_conv = ctow_conv; + if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte))) + return False; + private->cstomb_conv = conv; + + if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNWideChar))) + return False; + private->cstowc_conv = conv; + + private->locale_code = * _XimGetLocaleCode(XLC_PUBLIC(lcd,encoding_name), + (XlcCharSet*) &(private->keyboard_charset)); return True; } |