summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-06-15 01:54:47 (GMT)
committerhobbs <hobbs>2002-06-15 01:54:47 (GMT)
commitb9551536f704910727aa738f8a6e3aac1219c67f (patch)
tree2e6a97cd75b9a0c0d3577446fca47813f6ffc2c3 /generic/tkCmds.c
parent933069d8ffa51f596b667e6e357ec9c94f26dc65 (diff)
downloadtk-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/tkCmds.c')
-rw-r--r--generic/tkCmds.c16
1 files changed, 13 insertions, 3 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) {