From c9a242023cdce14e45cb94330e1800c7e864e4c2 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 16 Dec 1999 21:59:13 +0000 Subject: * 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. --- unix/tkUnixKey.c | 8 ++++---- 1 file 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 { -- cgit v0.12