summaryrefslogtreecommitdiffstats
path: root/mac/tkMacWm.c
diff options
context:
space:
mode:
authorwelch <welch>1998-06-27 18:06:37 (GMT)
committerwelch <welch>1998-06-27 18:06:37 (GMT)
commitadcb060b5ab8d310f5aff8a1119d3b97baf86641 (patch)
tree759f8786c82028afeb67bd971309b7b328d81d7f /mac/tkMacWm.c
parentd010dca55fd7a02e3fe6e50910359d8d4915f003 (diff)
downloadtk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.zip
tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.gz
tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.bz2
plugin updates
Diffstat (limited to 'mac/tkMacWm.c')
-rw-r--r--mac/tkMacWm.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/mac/tkMacWm.c b/mac/tkMacWm.c
index 56c4b8a..a8959f3 100644
--- a/mac/tkMacWm.c
+++ b/mac/tkMacWm.c
@@ -19,6 +19,7 @@
#include <Windows.h>
#include <ToolUtils.h>
+#include <tclMac.h>
#include "tkPort.h"
#include "tkInt.h"
#include "tkMacInt.h"
@@ -532,7 +533,7 @@ TkWmMapWindow(
*/
XMapWindow(winPtr->display, winPtr->window);
-
+
/*
* Now that the window is visable we can determine the offset
* from the window's content orgin to the window's decorative
@@ -2333,12 +2334,26 @@ Tk_GetRootCoords(
y += winPtr->changes.y + winPtr->changes.border_width;
} else {
+ Point theOffset;
- /*
- * NOTE: Here we should handle
- * out of process embedding.
- */
-
+ if (gMacEmbedHandler->getOffsetProc != NULL) {
+ /*
+ * We do not require that the changes.x & changes.y for
+ * a non-Tk master window be kept up to date. So we
+ * first subtract off the possibly bogus values that have
+ * been added on at the top of this pass through the loop,
+ * and then call out to the getOffsetProc to give us
+ * the correct offset.
+ */
+
+ x -= winPtr->changes.x + winPtr->changes.border_width;
+ y -= winPtr->changes.y + winPtr->changes.border_width;
+
+ gMacEmbedHandler->getOffsetProc((Tk_Window) winPtr, &theOffset);
+
+ x += theOffset.h;
+ y += theOffset.v;
+ }
break;
}
}
@@ -3861,6 +3876,13 @@ TkMacMakeRealWindowExist(
TkMacMakeRealWindowExist(contWinPtr->privatePtr->toplevel->winPtr);
macWin->flags |= TK_HOST_EXISTS;
return;
+ } else if (gMacEmbedHandler != NULL) {
+ if (gMacEmbedHandler->containerExistProc != NULL) {
+ if (gMacEmbedHandler->containerExistProc((Tk_Window) winPtr) != TCL_OK) {
+ panic("ContainerExistProc could not make container");
+ }
+ }
+ return;
} else {
panic("TkMacMakeRealWindowExist could not find container");
}