summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorstanton <stanton>1998-08-04 18:53:47 (GMT)
committerstanton <stanton>1998-08-04 18:53:47 (GMT)
commitaa7276196c778dc82df8be6309c5be0132d0e700 (patch)
tree6fff33c6b75c5ea8436a9cad038315231e0cfcd1 /win/tkWinWm.c
parent0366531b7aee42a2fa64d4e092f6f5cef6f7f4f4 (diff)
downloadtk-aa7276196c778dc82df8be6309c5be0132d0e700.zip
tk-aa7276196c778dc82df8be6309c5be0132d0e700.tar.gz
tk-aa7276196c778dc82df8be6309c5be0132d0e700.tar.bz2
fixed bug in menubar handling so menubar doesn't get destroyed when a
window is destroyed
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 6ec1a2a..3a280f4 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -731,6 +731,13 @@ UpdateWrapper(winPtr)
if (oldWrapper && (oldWrapper != wmPtr->wrapper)
&& (oldWrapper != GetDesktopWindow())) {
SetWindowLong(oldWrapper, GWL_USERDATA, (LONG) NULL);
+
+ /*
+ * Remove the menubar before destroying the window so the menubar
+ * isn't destroyed.
+ */
+
+ SetMenu(oldWrapper, NULL);
DestroyWindow(oldWrapper);
}
wmPtr->flags &= ~WM_NEVER_MAPPED;