summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2005-01-09 18:28:05 (GMT)
committerchengyemao <chengyemao>2005-01-09 18:28:05 (GMT)
commita2455a5686d0db82e6d05203f8048152c7e7193f (patch)
tree1bb1ddf055844df628ee13afe56678577b189eee /win/tkWinWm.c
parentcba943c4319df81bcd561b2e6f6ec5e445d8dd11 (diff)
downloadtk-a2455a5686d0db82e6d05203f8048152c7e7193f.zip
tk-a2455a5686d0db82e6d05203f8048152c7e7193f.tar.gz
tk-a2455a5686d0db82e6d05203f8048152c7e7193f.tar.bz2
Changed to make platform implementation ready for a toplevel -use option; completed a full toplevel -use option configuration for Windows
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 1e875d2..1dec80e 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinWm.c,v 1.89 2005/01/09 00:22:48 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.90 2005/01/09 18:28:06 chengyemao Exp $
*/
#include "tkWinInt.h"
@@ -2204,7 +2204,7 @@ UpdateWrapper(winPtr)
{
SendMessage(wmPtr->wrapper, TK_GEOMETRYREQ,
Tk_ReqWidth((Tk_Window)winPtr), Tk_ReqHeight((Tk_Window)winPtr));
- SendMessage(wmPtr->wrapper, TK_SETMENU, (WPARAM)wmPtr->hMenu, 0);
+ SendMessage(wmPtr->wrapper, TK_SETMENU, (WPARAM)wmPtr->hMenu, (LPARAM)Tk_GetMenuHWND((Tk_Window)winPtr));
}
}
@@ -7950,3 +7950,36 @@ long TkpWinToplevelOverrideRedirect(winPtr, reqValue)
}
return reqValue;
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpWinToplevelDetachWindow --
+ *
+ * This function is to be usd for changing a toplevel's wrapper or
+ * container.
+ *
+ * Results:
+ * The window's wrapper/container is removed.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void TkpWinToplevelDetachWindow(winPtr)
+ TkWindow *winPtr;
+{
+ register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ if(winPtr->flags & TK_EMBEDDED) {
+ int state = SendMessage(wmPtr->wrapper, TK_STATE, -1, -1);
+ SendMessage(wmPtr->wrapper, TK_SETMENU, 0, 0);
+ SendMessage(wmPtr->wrapper, TK_DETACHWINDOW, 0, 0);
+ winPtr->flags &= ~TK_EMBEDDED;
+ winPtr->privatePtr = NULL;
+ wmPtr->wrapper = None;
+ wmPtr->hints.initial_state = state;
+ }
+ TkpWinToplevelOverrideRedirect(winPtr, 1);
+}