diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCmds.c | 10 | ||||
-rw-r--r-- | generic/tkEvent.c | 4 | ||||
-rw-r--r-- | generic/tkInt.h | 12 |
3 files changed, 17 insertions, 9 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 16739c2..dcf0c64 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCmds.c,v 1.25 2002/06/15 01:54:47 hobbs Exp $ + * RCS: @(#) $Id: tkCmds.c,v 1.26 2002/06/15 02:08:12 hobbs Exp $ */ #include "tkPort.h" @@ -714,7 +714,11 @@ Tk_TkObjCmd(clientData, interp, objc, objv) return TCL_ERROR; } #ifdef TK_USE_INPUT_METHODS - dispPtr->useInputMethods = boolVal; + if (boolVal) { + dispPtr->flags |= TK_DISPLAY_USE_IM; + } else { + dispPtr->flags &= ~TK_DISPLAY_USE_IM; + } #endif /* TK_USE_INPUT_METHODS */ } else if ((objc - skip) != 2) { Tcl_WrongNumArgs(interp, 2, objv, @@ -722,7 +726,7 @@ Tk_TkObjCmd(clientData, interp, objc, objv) return TCL_ERROR; } Tcl_SetBooleanObj(Tcl_GetObjResult(interp), - dispPtr->useInputMethods); + (dispPtr->flags & TK_DISPLAY_USE_IM)); break; } } diff --git a/generic/tkEvent.c b/generic/tkEvent.c index f096111..754b451 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEvent.c,v 1.14 2002/06/15 01:54:09 hobbs Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.15 2002/06/15 02:08:12 hobbs Exp $ */ #include "tkPort.h" @@ -861,7 +861,7 @@ Tk_HandleEvent(eventPtr) * Unix, but this hasn't been factored out of the generic code yet. */ dispPtr = winPtr->dispPtr; - if ((dispPtr->useInputMethods)) { + if ((dispPtr->flags & TK_DISPLAY_USE_IM)) { if (!(winPtr->flags & (TK_CHECKED_IC|TK_ALREADY_DEAD))) { winPtr->flags |= TK_CHECKED_IC; if (dispPtr->inputMethod != NULL) { diff --git a/generic/tkInt.h b/generic/tkInt.h index f7b260a..4a7e74c 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: $Id: tkInt.h,v 1.47 2002/06/15 01:54:47 hobbs Exp $ + * RCS: $Id: tkInt.h,v 1.48 2002/06/15 02:08:12 hobbs Exp $ */ #ifndef _TKINT @@ -482,7 +482,6 @@ typedef struct TkDisplay { Window warpWindow; int warpX; int warpY; - int useInputMethods; /* Whether to use input methods */ /* * The following field(s) were all added for Tk8.4 @@ -496,13 +495,18 @@ typedef struct TkDisplay { * Flag values for TkDisplay flags. * TK_DISPLAY_COLLAPSE_MOTION_EVENTS: (default on) * Indicates that we should collapse motion events on this display + * TK_DISPLAY_USE_IM: (default on) + * Whether to use input methods for this display * TK_DISPLAY_XIM_SPOT: (default off) * Indicates that we should use over-the-spot XIM on this display + * TK_DISPLAY_WM_TRACING: (default off) + * Whether we should do wm tracing on this display. */ #define TK_DISPLAY_COLLAPSE_MOTION_EVENTS (1 << 0) -#define TK_DISPLAY_XIM_SPOT (1 << 1) -#define TK_DISPLAY_WM_TRACING (1 << 2) +#define TK_DISPLAY_USE_IM (1 << 1) +#define TK_DISPLAY_XIM_SPOT (1 << 2) +#define TK_DISPLAY_WM_TRACING (1 << 3) /* * One of the following structures exists for each error handler |