summaryrefslogtreecommitdiffstats
path: root/mac/tkMacEmbed.c
diff options
context:
space:
mode:
authordas <das>2002-10-09 11:56:25 (GMT)
committerdas <das>2002-10-09 11:56:25 (GMT)
commit4278227fc8a6be392dcdaeeb74167fd1197e50ed (patch)
tree7a0531085231adfb4afeee1749324d002f0e35c2 /mac/tkMacEmbed.c
parent8cbbdb18b55a4c0123e7c195f078bfe52e27f2a4 (diff)
downloadtk-4278227fc8a6be392dcdaeeb74167fd1197e50ed.zip
tk-4278227fc8a6be392dcdaeeb74167fd1197e50ed.tar.gz
tk-4278227fc8a6be392dcdaeeb74167fd1197e50ed.tar.bz2
* generic/tkInt.decls(tkIntXlib): added XQueryTree declaration for
mac & aqua, since it's now called from ParentXId via Tk_HandleEvent. * generic/tkIntXlibDecls.h: * generic/tkStubInit.c: regen. * mac/tkMacXStubs.c: added XQueryTree stub * mac/tkMacEmbed.c (TkpUseWindow): check that container window has -container option set (sync with other platforms). * mac/tkMacBitmap.c: * mac/tkMacFont.c: * mac/tkMacSend.c: * mac/tkMacTest.c: * mac/tkMacWm.c: CONSTification. * mac/tkMacProjects.sea.hqx: added tkStyle.c and tkUndo.c to tk library projects.
Diffstat (limited to 'mac/tkMacEmbed.c')
-rw-r--r--mac/tkMacEmbed.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/mac/tkMacEmbed.c b/mac/tkMacEmbed.c
index d370f32..06ceaa4 100644
--- a/mac/tkMacEmbed.c
+++ b/mac/tkMacEmbed.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacEmbed.c,v 1.5 2002/08/05 04:30:40 dgp Exp $
+ * RCS: @(#) $Id: tkMacEmbed.c,v 1.6 2002/10/09 11:56:39 das Exp $
*/
#include "tkInt.h"
@@ -236,6 +236,7 @@ TkpUseWindow(
* for tkwin; must be an integer value. */
{
TkWindow *winPtr = (TkWindow *) tkwin;
+ TkWindow *usePtr;
MacDrawable *parent, *macWin;
Container *containerPtr;
XEvent event;
@@ -259,6 +260,20 @@ TkpUseWindow(
return TCL_ERROR;
}
+ usePtr = (TkWindow *) Tk_IdToWindow(winPtr->display, (Window) result);
+
+ if (usePtr == NULL) {
+ Tcl_AppendResult(interp, "Tk window does not correspond to id \"",
+ string, "\"", (char *) NULL);
+ return TCL_ERROR;
+ } else {
+ if (!(usePtr->flags & TK_CONTAINER)) {
+ Tcl_AppendResult(interp, "window \"", usePtr->pathName,
+ "\" doesn't have -container option set", (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+
parent = (MacDrawable *) result;
/*