summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-06-15 01:54:46 (GMT)
committerhobbs <hobbs@noemail.net>2002-06-15 01:54:46 (GMT)
commitec01ad36d969dd69f47db86c3ce7f76a1079a95b (patch)
tree2e6a97cd75b9a0c0d3577446fca47813f6ffc2c3 /generic/tkCmds.c
parentd56143a3561200db2cae71bada60a87629d52612 (diff)
downloadtk-ec01ad36d969dd69f47db86c3ce7f76a1079a95b.zip
tk-ec01ad36d969dd69f47db86c3ce7f76a1079a95b.tar.gz
tk-ec01ad36d969dd69f47db86c3ce7f76a1079a95b.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) FossilOrigin-Name: bdc985bf1e3425faffc75d12dd8d12dae526486f
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) {