summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;