summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-16 21:59:13 (GMT)
committerhobbs <hobbs>1999-12-16 21:59:13 (GMT)
commitc9a242023cdce14e45cb94330e1800c7e864e4c2 (patch)
tree645c439d46ba5429c6d2fcfa3036ad439e6f0f93 /unix
parent99ebbea7d8ad9ca1492e94027473ac3f7260e356 (diff)
downloadtk-c9a242023cdce14e45cb94330e1800c7e864e4c2.zip
tk-c9a242023cdce14e45cb94330e1800c7e864e4c2.tar.gz
tk-c9a242023cdce14e45cb94330e1800c7e864e4c2.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.
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixKey.c8
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 {