summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
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: {