summaryrefslogtreecommitdiffstats
path: root/win/tkWinEmbed.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2004-12-20 15:30:43 (GMT)
committerchengyemao <chengyemao>2004-12-20 15:30:43 (GMT)
commitc2085b76d7ca3b2537ab4e6296358e098fb06aca (patch)
tree4b4a7c0351384006b47bbb3fbad4b3edd6afcc31 /win/tkWinEmbed.c
parent305b4b22eef2f33fc2f65c97556123af3efdde37 (diff)
downloadtk-c2085b76d7ca3b2537ab4e6296358e098fb06aca.zip
tk-c2085b76d7ca3b2537ab4e6296358e098fb06aca.tar.gz
tk-c2085b76d7ca3b2537ab4e6296358e098fb06aca.tar.bz2
implemented overrideredirect for an embedded; corrected incorrect frame upper left x and y of an embedded toplevel
Diffstat (limited to 'win/tkWinEmbed.c')
-rw-r--r--win/tkWinEmbed.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index a9f987e..1aca63f 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinEmbed.c,v 1.14 2004/12/20 01:13:12 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinEmbed.c,v 1.15 2004/12/20 15:30:43 chengyemao Exp $
*/
#include "tkWinInt.h"
@@ -471,6 +471,10 @@ TkWinEmbeddedEventProc(hwnd, message, wParam, lParam)
result = TkpWinToplevelMove(containerPtr->parentPtr, wParam, lParam);
break;
+ case TK_OVERRIDEREDIRECT:
+ result = TkpWinToplevelOverrideRedirect(containerPtr->parentPtr, wParam);
+ break;
+
/*
* Return 0 since the current Tk container implementation
* is unable to provide following services.
@@ -619,6 +623,40 @@ TkpGetOtherWindow(winPtr)
/*
*----------------------------------------------------------------------
*
+ * Tk_GetEmbeddedHWnd --
+ *
+ * This function returns the embedded window id.
+ *
+ * Results:
+ * If winPtr is a container, the return value is the HWND for the
+ * embedded window. Otherwise it returns NULL.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+HWND
+Tk_GetEmbeddedHWnd(winPtr)
+ TkWindow *winPtr;
+{
+ Container *containerPtr;
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+
+ for (containerPtr = tsdPtr->firstContainerPtr; containerPtr != NULL;
+ containerPtr = containerPtr->nextPtr) {
+ if (containerPtr->parentPtr == winPtr) {
+ return containerPtr->embeddedHWnd;
+ }
+ }
+ return NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* TkpClaimFocus --
*
* This procedure is invoked when someone asks or the input focus