diff options
author | hobbs <hobbs@noemail.net> | 1999-12-16 21:59:13 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 1999-12-16 21:59:13 (GMT) |
commit | 9224853436ab88137d142091b56b33b0d37e6952 (patch) | |
tree | 645c439d46ba5429c6d2fcfa3036ad439e6f0f93 | |
parent | b8ddc9f7f19d2d4abdaf3f07775e97f767c83e24 (diff) | |
download | tk-9224853436ab88137d142091b56b33b0d37e6952.zip tk-9224853436ab88137d142091b56b33b0d37e6952.tar.gz tk-9224853436ab88137d142091b56b33b0d37e6952.tar.bz2 |
* unix/tkUnixKey.c:
* generic/tkCmds.c:
* generic/tkEvent.c:
* generic/tkWindow.c:
* generic/tkInt.h: add 'tk useinputmethods ?-display win? ?bool?'
call to provide support for disabling/enabling the use of XIM on
X. This was previously all done at compile time, and always on.
FossilOrigin-Name: 5f852c60baf4a5e50506fe5402ff5e61991d5d14
-rw-r--r-- | unix/tkUnixKey.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index 64b2218..effce2f 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixKey.c,v 1.2 1999/04/16 01:51:46 stanton Exp $ + * RCS: @(#) $Id: tkUnixKey.c,v 1.3 1999/12/16 21:59:13 hobbs Exp $ */ #include "tkInt.h" @@ -53,7 +53,8 @@ TkpGetString(winPtr, eventPtr, dsPtr) Tcl_DStringSetLength(&buf, TCL_DSTRING_STATIC_SIZE-1); #ifdef TK_USE_INPUT_METHODS - if ((winPtr->inputContext != NULL) + if (winPtr->dispPtr->useInputMethods + && (winPtr->inputContext != NULL) && (eventPtr->type == KeyPress)) { len = XmbLookupString(winPtr->inputContext, &eventPtr->xkey, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf), @@ -67,8 +68,7 @@ TkpGetString(winPtr, eventPtr, dsPtr) len = XmbLookupString(winPtr->inputContext, &eventPtr->xkey, Tcl_DStringValue(&buf), len, (KeySym *) NULL, &status); } - if ((status != XLookupChars) - && (status != XLookupBoth)) { + if ((status != XLookupChars) && (status != XLookupBoth)) { len = 0; } } else { |