Avoid problems when reparenting a TLW under a child in wxGTK.

Don't use a TLW with gtk_fixed_put().

Closes #15237.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-06-10 15:53:04 +00:00
parent bf5e92db1c
commit 4775836d37

View File

@@ -379,7 +379,10 @@ void wxPizza::move(GtkWidget* widget, int x, int y, int width, int height)
void wxPizza::put(GtkWidget* widget, int x, int y, int width, int height)
{
gtk_fixed_put(GTK_FIXED(this), widget, 0, 0);
// Re-parenting a TLW under a child window is possible at wx level but
// using a TLW as child at GTK+ level results in problems, so don't do it.
if (!gtk_widget_is_toplevel(GTK_WIDGET(widget)))
gtk_fixed_put(GTK_FIXED(this), widget, 0, 0);
wxPizzaChild* child = new wxPizzaChild;
child->widget = widget;