summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEmbed.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2014-11-20 02:34:09 (GMT)
committerKevin Walzer <kw@codebykevin.com>2014-11-20 02:34:09 (GMT)
commit02b543ede36c5f387093c576a915c0788628bedb (patch)
tree5a101e668abf73d28f52221e94951ca6a824c959 /macosx/tkMacOSXEmbed.c
parent0e22d8ae3dcf3f15ae9df9bab55581868f8dbf5a (diff)
downloadtk-02b543ede36c5f387093c576a915c0788628bedb.zip
tk-02b543ede36c5f387093c576a915c0788628bedb.tar.gz
tk-02b543ede36c5f387093c576a915c0788628bedb.tar.bz2
Back out changes not pertaining to private API; those files should not have been updated.
Diffstat (limited to 'macosx/tkMacOSXEmbed.c')
-rw-r--r--macosx/tkMacOSXEmbed.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index f9700f6..41a1e1b 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.
*/
-
+
#include "tkMacOSXPrivate.h"
#include "tkBusy.h"
@@ -207,7 +207,6 @@ TkpUseWindow(
MacDrawable *parent, *macWin;
Container *containerPtr;
-
if (winPtr->window != None) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can't modify container after widget is created", -1));
@@ -248,14 +247,14 @@ TkpUseWindow(
* Container structure, since we only allow the case where both container
* and embedded app. are in the same process.
*/
-
+
for (containerPtr = firstContainerPtr; containerPtr != NULL;
- containerPtr = containerPtr->nextPtr) {
- if (containerPtr->parent == (Window) parent) {
- winPtr->flags |= TK_BOTH_HALVES;
- containerPtr->parentPtr->flags |= TK_BOTH_HALVES;
- break;
- }
+ containerPtr = containerPtr->nextPtr) {
+ if (containerPtr->parent == (Window) parent) {
+ winPtr->flags |= TK_BOTH_HALVES;
+ containerPtr->parentPtr->flags |= TK_BOTH_HALVES;
+ break;
+ }
}
/*
@@ -314,10 +313,9 @@ TkpUseWindow(
if (tkMacOSXEmbedHandler == NULL ||
tkMacOSXEmbedHandler->registerWinProc((long) parent,
(Tk_Window) winPtr) != TCL_OK) {
-
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "The window ID %s does not correspond to a valid Tk Window",
- string));
+ "The window ID %s does not correspond to a valid Tk Window",
+ string));
Tcl_SetErrorCode(interp, "TK", "EMBED", "HANDLE", NULL);
return TCL_ERROR;
}
@@ -393,6 +391,7 @@ TkpMakeContainer(
* sure the argument to -use is valid.
*/
+ Tk_MakeWindowExist(tkwin);
containerPtr = ckalloc(sizeof(Container));
containerPtr->parent = Tk_WindowId(tkwin);
containerPtr->parentPtr = winPtr;