diff options
author | vincentdarley <vincentdarley> | 2006-04-18 22:16:02 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2006-04-18 22:16:02 (GMT) |
commit | 11a20a86ed32944334777fe72ba20dea04657822 (patch) | |
tree | 27f703f673beaac2d8b9c20c040f65af01c9ce43 /macosx | |
parent | eb477c5938ecac0c175270fce804c37f337b7f13 (diff) | |
download | tk-11a20a86ed32944334777fe72ba20dea04657822.zip tk-11a20a86ed32944334777fe72ba20dea04657822.tar.gz tk-11a20a86ed32944334777fe72ba20dea04657822.tar.bz2 |
fix to embed.test failures
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index d6358f9..42d2c07 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.5 2006/03/24 14:58:01 das Exp $ + * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.6 2006/04/18 22:16:02 vincentdarley Exp $ */ #include "tkMacOSXInt.h" @@ -229,6 +229,7 @@ TkpUseWindow( * for tkwin; must be an integer value. */ { TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *usePtr; MacDrawable *parent, *macWin; Container *containerPtr; XEvent event; @@ -255,6 +256,20 @@ TkpUseWindow( parent = (MacDrawable *) result; + usePtr = (TkWindow *) Tk_IdToWindow(winPtr->display, parent); + if (usePtr != NULL) { + if (!(usePtr->flags & TK_CONTAINER)) { + Tcl_AppendResult(interp, "window \"", usePtr->pathName, + "\" doesn't have -container option set", NULL); + return TCL_ERROR; + } + } + + /* + * The code below can probably be simplified given we have already + * discovered 'usePtr' above. + */ + /* * Save information about the container and the embedded window * in a Container structure. Currently, there must already be an existing |