From 4775836d3736c6a4ac84d6427c4c619134816530 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 10 Jun 2013 15:53:04 +0000 Subject: [PATCH] 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 --- src/gtk/win_gtk.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gtk/win_gtk.cpp b/src/gtk/win_gtk.cpp index 91f6cf0..9d05f09 100644 --- a/src/gtk/win_gtk.cpp +++ b/src/gtk/win_gtk.cpp @@ -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; -- 2.7.4