summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authorericm <ericm>2000-04-18 02:18:32 (GMT)
committerericm <ericm>2000-04-18 02:18:32 (GMT)
commit3b8d97bbddc028359dd7f579f7f4e2fdaf887752 (patch)
tree1a5b1bcdfcedcc57a982da47be2f49a3aba66103 /generic/tkCmds.c
parent642a893448534c32d814fa625c78d6ab695cad1b (diff)
downloadtk-3b8d97bbddc028359dd7f579f7f4e2fdaf887752.zip
tk-3b8d97bbddc028359dd7f579f7f4e2fdaf887752.tar.gz
tk-3b8d97bbddc028359dd7f579f7f4e2fdaf887752.tar.bz2
* win/tkWinDialog.c: Added checks for visibility of parent window
before creating MessageBox and ChooseColor dialogs; this prevents the application from locking when the parent is withdrawn and the message box is created. In these cases, the window will be created without a parent. * unix/mkLinks: Added WinViewable.3. * tests/msgbox.test: Added tests for patch from [Bug: 4997]. * library/msgbox.tcl: * library/dialog.tcl: Applied patch from [Bug: 4997]; detaches dialog window from parent if parent is not viewable. * library/bgerror.tcl: Removed workaround from [Bug: 4370]; this is superceeded by patches to dialog.tcl. * generic/tkCmds.c: Changed WinfoObjCmd to use Tk_IsViewable function to determine visibility of windows instead of inlining the code. * generic/tkStubInit.c: * generic/tkDecls.h: * generic/tk.decls: Added Tk_IsViewable declaration.
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r--generic/tkCmds.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 34d383c..60b1515 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.11 2000/02/01 11:41:10 hobbs Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.12 2000/04/18 02:18:32 ericm Exp $
*/
#include "tkPort.h"
@@ -1179,19 +1179,7 @@ Tk_WinfoObjCmd(clientData, interp, objc, objv)
break;
}
case WIN_VIEWABLE: {
- int viewable;
-
- 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);
+ Tcl_SetBooleanObj(resultPtr, Tk_IsViewable(tkwin));
break;
}
case WIN_VISUAL: {