Attachment "wm_crash.patch" to
ticket [572948ff]
added by
mdejong
2002-06-24 09:40:08.
Index: tests/wm.test
===================================================================
RCS file: /cvsroot/tktoolkit/tk/tests/wm.test,v
retrieving revision 1.12
diff -u -r1.12 wm.test
--- tests/wm.test 24 Jun 2002 02:17:57 -0000 1.12
+++ tests/wm.test 24 Jun 2002 02:33:56 -0000
@@ -509,6 +509,30 @@
wm transient .subject
} {}
+test wm-transient-5.4 { pending idle callbacks should be
+ canceled when master/transient windows are destroyed } {
+ deleteWindows
+ toplevel .master
+ toplevel .subject
+ update
+ wm transient .subject .master
+ wm withdraw .master
+ destroy .subject .master
+ update
+} {}
+
+test wm-transient-5.5 { pending idle callbacks should be
+ canceled when master/transient windows are destroyed } {
+ deleteWindows
+ toplevel .master
+ toplevel .subject
+ update
+ wm transient .subject .master
+ wm withdraw .master
+ destroy .master .subject
+ update
+} {}
+
test wm-transient-6.1 { a withdrawn transient does not track
state changes in the master } {
deleteWindows
Index: win/tkWinWm.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/win/tkWinWm.c,v
retrieving revision 1.44
diff -u -r1.44 tkWinWm.c
--- win/tkWinWm.c 24 Jun 2002 02:17:57 -0000 1.44
+++ win/tkWinWm.c 24 Jun 2002 02:34:05 -0000
@@ -1562,6 +1562,10 @@
* Compute the geometry of the parent and child windows.
*/
+ if ((wmPtr->flags & WM_UPDATE_PENDING)) {
+ Tcl_CancelIdleCall(UpdateGeometryInfo, (ClientData) winPtr);
+ }
+
wmPtr->flags |= WM_CREATE_PENDING|WM_MOVE_PENDING;
UpdateGeometryInfo((ClientData)winPtr);
wmPtr->flags &= ~(WM_CREATE_PENDING|WM_MOVE_PENDING);