+2002-09-13 Keith Seitz <keiths@redhat.com>
+
+ From Mo Dejong <supermo@bayarea.net>:
+ * win/tkWinWm.c (Tk_WmCmd): Check the WM_NEVER_MAPPED
+ flag while processing the wm deiconify command.
+ The WM_UPDATE_PENDING flag should never be set when
+ WM_NEVER_MAPPED is set, but double check so that
+ the implementation is more explicit and matches
+ the comment just above.
+ Return without invoking TkWmRestackToplevel or
+ TkSetFocusWin on a toplevel that has never been
+ mapped. This fixes a bug where a toplevel is mapped
+ with the wrong size and is then resized by the
+ idle call to MapFrame.
+
2002-07-31 Keith Seitz <keiths@redhat.com>
* win/winMain.c (main): Ifdef out for cygwin.
}
/*
* If WM_UPDATE_PENDING is true, a pending UpdateGeometryInfo may
- * need to be called first to update a withdrew toplevel's geometry
+ * need to be called first to update a withdrawn toplevel's geometry
* before it is deiconified by TkpWmSetState.
* Don't bother if we've never been mapped.
*/
- if (wmPtr->flags & WM_UPDATE_PENDING) {
+ if ((wmPtr->flags & WM_UPDATE_PENDING) &&
+ !(wmPtr->flags & WM_NEVER_MAPPED)) {
Tcl_CancelIdleCall(UpdateGeometryInfo, (ClientData) winPtr);
UpdateGeometryInfo((ClientData) winPtr);
}
}
/*
+ * An unmapped window will be mapped at idle time
+ * by a call to MapFrame. That calls CreateWrapper
+ * which sets the focus and raises the window.
+ */
+ if (wmPtr->flags & WM_NEVER_MAPPED) {
+ return TCL_OK;
+ }
+
+ /*
* Follow Windows-like style here, raising the window to the top.
*/
TkWmRestackToplevel(winPtr, Above, NULL);