summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-06-15 02:08:12 (GMT)
committerhobbs <hobbs@noemail.net>2002-06-15 02:08:12 (GMT)
commit9eac8470623bd74016e540031e09cf94cd0dabe6 (patch)
tree1a7e9938d5736d6fde9910a8fb5a013e0cff6b32 /generic
parentec01ad36d969dd69f47db86c3ce7f76a1079a95b (diff)
downloadtk-9eac8470623bd74016e540031e09cf94cd0dabe6.zip
tk-9eac8470623bd74016e540031e09cf94cd0dabe6.tar.gz
tk-9eac8470623bd74016e540031e09cf94cd0dabe6.tar.bz2
* generic/tkCmds.c (Tk_TkObjCmd):
* unix/tkUnixKey.c (TkpGetString): * generic/tkEvent.c (Tk_HandleEvent): * generic/tkInt.h: changed useInputMethods boolean from int to a bit in the flags variable (TK_DISPLAY_USE_IM) FossilOrigin-Name: e07ed1cc5a967c0b9363ff1d0b2bf5dda93e30e8
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCmds.c10
-rw-r--r--generic/tkEvent.c4
-rw-r--r--generic/tkInt.h12
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