*** win/tkWinWm.c.orig	Wed Sep 22 08:53:25 1999
--- win/tkWinWm.c	Sun Jan 16 17:43:07 2000
***************
*** 1389,1394 ****
--- 1389,1406 ----
                      ": it is an embedded window", (char *) NULL);
              return TCL_ERROR;
          }
+         /*
+         11/14/99 Chengye Mao. The following if statement takes care
+         the problem.
+         If WM_UPDATE_PENDING is true, a pending UpdateGeometryInfo may
+         need to be called first to update a withdrew toplevel's geometry
+ 	before it is deiconified by TkpWmSetState.
+ 	UpdateGeometryInfo has no effect on an iconified toplevel.
+ 	*/
+ 	if (wmPtr->flags & WM_UPDATE_PENDING) {
+ 	    Tcl_CancelIdleCall(UpdateGeometryInfo, (ClientData) winPtr);
+ 	    UpdateGeometryInfo((ClientData) winPtr);
+ 	}
  	TkpWmSetState(winPtr, NormalState);
  	/*
  	 * Follow Windows-like style here:
