X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50e768b95a9112f21acbf0a4a10bfde3bb2d827b..19311d4e7c43a3f6243bf805c164fd76cada0386:/src/gtk1/glcanvas.cpp diff --git a/src/gtk1/glcanvas.cpp b/src/gtk1/glcanvas.cpp index 301240283e..30def50299 100644 --- a/src/gtk1/glcanvas.cpp +++ b/src/gtk1/glcanvas.cpp @@ -355,6 +355,15 @@ bool wxGLCanvas::Create( wxWindow *parent, gtk_widget_pop_visual(); gtk_widget_pop_colormap(); + // if our parent window is already visible, we had been realized before we + // connected to the "realize" signal and hence our m_glContext hasn't been + // initialized yet and we have to do it now + if (GTK_WIDGET_REALIZED(m_wxwindow)) + gtk_glwindow_realized_callback( m_wxwindow, this ); + + if (GTK_WIDGET_MAPPED(m_wxwindow)) + gtk_glwindow_map_callback( m_wxwindow, this ); + return TRUE; }