]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/glcanvas/gtk/glcanvas.cpp
1. test for thr_setconcurrency() added to configure
[wxWidgets.git] / utils / glcanvas / gtk / glcanvas.cpp
index 811c0fcb803453ef697a0e527e13b1cce4a56bcd..71d8228192e7daa9dce8a3fb770df4e2c301f55c 100644 (file)
@@ -154,6 +154,26 @@ gtk_glwindow_realized_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
     return FALSE;
 }
 
     return FALSE;
 }
 
+//-----------------------------------------------------------------------------
+// "map" from m_wxwindow
+//-----------------------------------------------------------------------------
+
+static gint
+gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
+{
+    if (win->m_glContext/* && win->m_exposed*/)
+    {
+        wxPaintEvent event( win->GetId() );
+        event.SetEventObject( win );
+        win->GetEventHandler()->ProcessEvent( event );
+
+        win->m_exposed = FALSE;
+        win->GetUpdateRegion().Clear();
+    }
+
+    return FALSE;
+}
+
 //-----------------------------------------------------------------------------
 // "expose_event" of m_wxwindow
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 // "expose_event" of m_wxwindow
 //-----------------------------------------------------------------------------
@@ -314,6 +334,9 @@ bool wxGLCanvas::Create( wxWindow *parent,
     gtk_signal_connect( GTK_OBJECT(m_wxwindow), "realize",
                             GTK_SIGNAL_FUNC(gtk_glwindow_realized_callback), (gpointer) this );
 
     gtk_signal_connect( GTK_OBJECT(m_wxwindow), "realize",
                             GTK_SIGNAL_FUNC(gtk_glwindow_realized_callback), (gpointer) this );
 
+    gtk_signal_connect( GTK_OBJECT(m_wxwindow), "map",
+                            GTK_SIGNAL_FUNC(gtk_glwindow_map_callback), (gpointer) this );
+
     gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
         GTK_SIGNAL_FUNC(gtk_glwindow_expose_callback), (gpointer)this );
 
     gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
         GTK_SIGNAL_FUNC(gtk_glwindow_expose_callback), (gpointer)this );