summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index a00d0ad..603f1df 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.79 2004/10/29 22:28:31 mdejong Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.80 2004/12/17 14:17:54 chengyemao Exp $
*/
#include "tkWinInt.h"
@@ -2190,7 +2190,13 @@ UpdateWrapper(winPtr)
}
wmPtr->flags &= ~WM_NEVER_MAPPED;
- SendMessage(wmPtr->wrapper, TK_ATTACHWINDOW, (WPARAM) child, 0);
+ if (winPtr->flags & TK_EMBEDDED) {
+ if(SendMessage(wmPtr->wrapper, TK_ATTACHWINDOW, (WPARAM) child, 0))
+ {
+ SendMessage(wmPtr->wrapper, TK_GEOMETRYREQ,
+ Tk_ReqWidth((Tk_Window)winPtr), Tk_ReqHeight((Tk_Window)winPtr));
+ }
+ }
/*
* Force an initial transition from withdrawn to the real
@@ -2550,6 +2556,10 @@ TkWmDeadWindow(winPtr)
} else {
DestroyWindow(Tk_GetHWND(winPtr->window));
}
+ } else {
+ if (wmPtr->wrapper != NULL) {
+ SendMessage(wmPtr->wrapper, TK_DETACHWINDOW, 0, 0);
+ }
}
if (wmPtr->iconPtr != NULL) {
/*
@@ -5337,16 +5347,6 @@ TopLevelEventProc(clientData, eventPtr)
Tk_DeleteErrorHandler(handler);
}
}
- else if (eventPtr->type == ConfigureNotify) {
- WmInfo *wmPtr;
- wmPtr = winPtr->wmInfoPtr;
-
- if (winPtr->flags & TK_EMBEDDED) {
- Tk_Window tkwin = (Tk_Window)winPtr;
- SendMessage(wmPtr->wrapper, TK_GEOMETRYREQ, Tk_ReqWidth(tkwin),
- Tk_ReqHeight(tkwin));
- }
- }
}
/*