diff options
author | hobbs <hobbs> | 2001-03-30 21:52:56 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-03-30 21:52:56 (GMT) |
commit | 62a4352037cac27e4f39fd9cd8bfe7c6f9cf4095 (patch) | |
tree | 2bca0c8d201a8a5aea0398fd494e8e9d823329e7 /win/tkWinWm.c | |
parent | 9f2dfbf322e9a4ecc4f8ac4ecf77f4af08244179 (diff) | |
download | tk-62a4352037cac27e4f39fd9cd8bfe7c6f9cf4095.zip tk-62a4352037cac27e4f39fd9cd8bfe7c6f9cf4095.tar.gz tk-62a4352037cac27e4f39fd9cd8bfe7c6f9cf4095.tar.bz2 |
* win/tkWinWm.c (UpdateWrapper): ensured that the passed in winPtr
had an existent window to operate on. [Bug #409172]
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index a587f35..4353e5b 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.28 2001/01/02 19:13:02 andreas_kupries Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.29 2001/03/30 21:52:56 hobbs Exp $ */ #include "tkWinInt.h" @@ -1462,8 +1462,8 @@ UpdateWrapper(winPtr) TkWindow *winPtr; /* Top-level window to redecorate. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; - HWND parentHWND = NULL, oldWrapper; - HWND child = TkWinGetHWND(winPtr->window); + HWND parentHWND, oldWrapper; + HWND child; int x, y, width, height, state; WINDOWPLACEMENT place; HICON hSmallIcon = NULL; @@ -1473,8 +1473,15 @@ UpdateWrapper(winPtr) ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - parentHWND = NULL; + if (winPtr->window == None) { + /* + * Ensure existence of the window to update the wrapper for. + */ + Tk_MakeWindowExist((Tk_Window) winPtr); + } + child = TkWinGetHWND(winPtr->window); + parentHWND = NULL; if (winPtr->flags & TK_EMBEDDED) { wmPtr->wrapper = (HWND) winPtr->privatePtr; |