changeset 106012:fae53e3bfda0

gtkutil.c (xg_update_frame_menubar): Do nothing if menubar already has a parent.
author Jan Djärv <jan.h.d@swipnet.se>
date Sat, 14 Nov 2009 18:22:34 +0000
parents 37fee35a6283
children f73265af0411
files src/ChangeLog src/gtkutil.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Nov 14 16:07:44 2009 +0000
+++ b/src/ChangeLog	Sat Nov 14 18:22:34 2009 +0000
@@ -1,5 +1,8 @@
 2009-11-14  Jan Djärv  <jan.h.d@swipnet.se>
 
+	* gtkutil.c (xg_update_frame_menubar): Do nothing if menubar already
+	has a parent.
+
 	* Makefile.in: If AUTO_DEPEND is defined, make gcc generate
 	dependency files in deps/. Include those files into Makefile.
 
--- a/src/gtkutil.c	Sat Nov 14 16:07:44 2009 +0000
+++ b/src/gtkutil.c	Sat Nov 14 18:22:34 2009 +0000
@@ -3001,6 +3001,9 @@
   if (!x->menubar_widget || GTK_WIDGET_MAPPED (x->menubar_widget))
     return 0;
 
+  if (x->menubar_widget && gtk_widget_get_parent (x->menubar_widget))
+    return 0; /* Already done this, happens for frames created invisible.  */
+
   BLOCK_INPUT;
 
   gtk_box_pack_start (GTK_BOX (x->vbox_widget), x->menubar_widget,