diff options
author | hobbs <hobbs> | 2002-06-15 01:54:47 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-06-15 01:54:47 (GMT) |
commit | b9551536f704910727aa738f8a6e3aac1219c67f (patch) | |
tree | 2e6a97cd75b9a0c0d3577446fca47813f6ffc2c3 /generic | |
parent | 933069d8ffa51f596b667e6e357ec9c94f26dc65 (diff) | |
download | tk-b9551536f704910727aa738f8a6e3aac1219c67f.zip tk-b9551536f704910727aa738f8a6e3aac1219c67f.tar.gz tk-b9551536f704910727aa738f8a6e3aac1219c67f.tar.bz2 |
* generic/tkInt.h:
* generic/tkCmds.c (Tk_WmObjCmd):
* unix/tkUnixWm.c (Tk_WmCmd):
* win/tkWinWm.c (Tk_WmCmd): changed wmTracing from being an int to
just a bit in the flags variable (TK_DISPLAY_WM_TRACING)
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCmds.c | 16 | ||||
-rw-r--r-- | generic/tkInt.h | 12 |
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 |