summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authorericm <ericm>2000-04-19 23:11:23 (GMT)
committerericm <ericm>2000-04-19 23:11:23 (GMT)
commit442d04988d260a0d338a53d0a81b0f17e9a5c3e8 (patch)
tree481483144079a54f8c17455ab1c9b9efa085f46e /generic/tkCmds.c
parent981af3eaf3d7d2aac6fc833575521e05a925811c (diff)
downloadtk-442d04988d260a0d338a53d0a81b0f17e9a5c3e8.zip
tk-442d04988d260a0d338a53d0a81b0f17e9a5c3e8.tar.gz
tk-442d04988d260a0d338a53d0a81b0f17e9a5c3e8.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).
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: {