summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-04-19 23:11:23 (GMT)
committerericm <ericm@noemail.net>2000-04-19 23:11:23 (GMT)
commita074f4d1d5a5b5fcd565a039022a421465242ce2 (patch)
tree481483144079a54f8c17455ab1c9b9efa085f46e /generic/tkCmds.c
parentd59489bdac532e0b71027d192419cd0be358e617 (diff)
downloadtk-a074f4d1d5a5b5fcd565a039022a421465242ce2.zip
tk-a074f4d1d5a5b5fcd565a039022a421465242ce2.tar.gz
tk-a074f4d1d5a5b5fcd565a039022a421465242ce2.tar.bz2
* doc/WinViewable.3:
* unix/mkLinks: Removed docs for Tk_IsViewable. * win/tkWinDialog.c: Removed calls to Tk_IsViewable. * generic/tkUtil.c: * generic/tkStubInit.c: * generic/tkDecls.h: * generic/tkCmds.c: * generic/tk.decls: Removed Tk_IsViewable function (it was not actually needed). FossilOrigin-Name: e6573914e2482a3c4a9f0cdfc307d2412ee6c8ee
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r--generic/tkCmds.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 60b1515..9bbfba3 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -10,7 +10,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.12 2000/04/18 02:18:32 ericm Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.13 2000/04/19 23:11:23 ericm Exp $
*/
#include "tkPort.h"
@@ -1179,7 +1179,18 @@ Tk_WinfoObjCmd(clientData, interp, objc, objv)
break;
}
case WIN_VIEWABLE: {
- Tcl_SetBooleanObj(resultPtr, Tk_IsViewable(tkwin));
+ int viewable = 0;
+ for ( ; ; winPtr = winPtr->parentPtr) {
+ if ((winPtr == NULL) || !(winPtr->flags & TK_MAPPED)) {
+ break;
+ }
+ if (winPtr->flags & TK_TOP_LEVEL) {
+ viewable = 1;
+ break;
+ }
+ }
+
+ Tcl_SetBooleanObj(resultPtr, viewable);
break;
}
case WIN_VISUAL: {