Send wxEVT_CREATE and do other post-realization initialization even if the widget was realized early.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2011-10-19 16:19:55 +00:00
parent 9a237e2f12
commit 843101f766

View File

@@ -2407,10 +2407,18 @@ void wxWindowGTK::PostCreation()
ConnectWidget( connect_widget ); ConnectWidget( connect_widget );
/* We cannot set colours, fonts and cursors before the widget has // We cannot set colours, fonts and cursors before the widget has been
been realized, so we do this directly after realization */ // realized, so we do this directly after realization -- unless the widget
g_signal_connect (connect_widget, "realize", // was in fact realized already.
G_CALLBACK (gtk_window_realized_callback), this); if ( gtk_widget_get_realized(connect_widget) )
{
gtk_window_realized_callback(connect_widget, this);
}
else
{
g_signal_connect (connect_widget, "realize",
G_CALLBACK (gtk_window_realized_callback), this);
}
if (!IsTopLevel()) if (!IsTopLevel())
{ {