summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-06-15 02:08:12 (GMT)
committerhobbs <hobbs>2002-06-15 02:08:12 (GMT)
commitc79fd6dcf3ca7f681ad3a9080eaebb25e97c2010 (patch)
tree1a7e9938d5736d6fde9910a8fb5a013e0cff6b32
parentb9551536f704910727aa738f8a6e3aac1219c67f (diff)
downloadtk-c79fd6dcf3ca7f681ad3a9080eaebb25e97c2010.zip
tk-c79fd6dcf3ca7f681ad3a9080eaebb25e97c2010.tar.gz
tk-c79fd6dcf3ca7f681ad3a9080eaebb25e97c2010.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)
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkCmds.c10
-rw-r--r--generic/tkEvent.c4
-rw-r--r--generic/tkInt.h12
-rw-r--r--unix/tkUnixKey.c4
5 files changed, 25 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 57d0554..4eea260 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2002-06-14 Jeff Hobbs <jeffh@ActiveState.com>
+ * 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)
+
* generic/tkInt.h:
* generic/tkCmds.c (Tk_WmObjCmd):
* unix/tkUnixWm.c (Tk_WmCmd):
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
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index 9bb4633..ac18f9c 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.8 2002/06/15 01:54:09 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixKey.c,v 1.9 2002/06/15 02:08:12 hobbs Exp $
*/
#include "tkInt.h"
@@ -95,7 +95,7 @@ TkpGetString(winPtr, eventPtr, dsPtr)
Tcl_DStringSetLength(&buf, TCL_DSTRING_STATIC_SIZE-1);
#ifdef TK_USE_INPUT_METHODS
- if (winPtr->dispPtr->useInputMethods
+ if ((winPtr->dispPtr->flags & TK_DISPLAY_USE_IM)
&& (winPtr->inputContext != NULL)
&& (eventPtr->type == KeyPress)) {
#if TK_XIM_SPOT