diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 17 |
2 files changed, 21 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-04-18 Vince Darley <vincentdarley@users.sourceforge.net> + + * macosx/tkMacOSXEmbed.c: fix to [Bug 1088814] test failures in + embed.test + 2006-04-11 Peter Spjuth <peter.spjuth@space.se> * generic/tkWindow.c (Tk_NameToWindow): Allow NULL interp to 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 |