summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCmds.c16
-rw-r--r--generic/tkInt.h12
2 files changed, 17 insertions, 11 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 1ef3361..16739c2 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.24 2002/06/14 22:25:12 jenglish Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.25 2002/06/15 01:54:47 hobbs Exp $
*/
#include "tkPort.h"
@@ -1629,6 +1629,7 @@ Tk_WmObjCmd(clientData, interp, objc, objv)
}
if (index == TKWM_TRACING) {
+ int wmTracing;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
if ((objc != 2) && (objc != 3)) {
@@ -1636,10 +1637,19 @@ Tk_WmObjCmd(clientData, interp, objc, objv)
return TCL_ERROR;
}
if (objc == 2) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(dispPtr->wmTracing));
+ Tcl_SetObjResult(interp,
+ Tcl_NewBooleanObj(dispPtr->flags & TK_DISPLAY_WM_TRACING));
return TCL_OK;
}
- return Tcl_GetBooleanFromObj(interp, objv[2], &dispPtr->wmTracing);
+ if (Tcl_GetBooleanFromObj(interp, objv[2], &wmTracing) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (wmTracing) {
+ dispPtr->flags |= TK_DISPLAY_WM_TRACING;
+ } else {
+ dispPtr->flags &= ~TK_DISPLAY_WM_TRACING;
+ }
+ return TCL_OK;
}
if (objc < 3) {
diff --git a/generic/tkInt.h b/generic/tkInt.h
index f0c80a3..f7b260a 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.46 2002/06/15 01:09:36 hobbs Exp $
+ * RCS: $Id: tkInt.h,v 1.47 2002/06/15 01:54:47 hobbs Exp $
*/
#ifndef _TKINT
@@ -432,11 +432,6 @@ typedef struct TkDisplay {
* Information used by tkUnixWm.c and tkWinWm.c only:
*/
- int wmTracing; /* Used to enable or disable tracing in
- * this module. If tracing is enabled,
- * then information is printed on
- * standard output about interesting
- * interactions with the window manager. */
struct TkWmInfo *firstWmPtr; /* Points to first top-level window. */
struct TkWmInfo *foregroundWmPtr;
/* Points to the foreground window. */
@@ -501,12 +496,13 @@ 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_USE_INPUT_METHODS: (default off)
+ * TK_DISPLAY_XIM_SPOT: (default off)
* Indicates that we should use over-the-spot XIM on this display
*/
#define TK_DISPLAY_COLLAPSE_MOTION_EVENTS (1 << 0)
-#define TK_USE_XIM_SPOT (1 << 1)
+#define TK_DISPLAY_XIM_SPOT (1 << 1)
+#define TK_DISPLAY_WM_TRACING (1 << 2)
/*
* One of the following structures exists for each error handler