]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/glcmn.cpp
Skip the event to allow further child processing
[wxWidgets.git] / src / common / glcmn.cpp
index ffcb45a60366083877286f4be102f24b2cf00949..0d85eab14c8cbacac696edb84566d2e3d9f7a60c 100644 (file)
@@ -41,6 +41,17 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
 // implementation
 // ============================================================================
 
+wxGLCanvasBase::wxGLCanvasBase()
+{
+#if WXWIN_COMPATIBILITY_2_8
+    m_glContext = NULL;
+#endif
+
+    // we always paint background entirely ourselves so prevent wx from erasing
+    // it to avoid flicker
+    SetBackgroundStyle(wxBG_STYLE_CUSTOM);
+}
+
 void wxGLCanvasBase::SetCurrent(const wxGLContext& context) const
 {
     // although on MSW it works even if the window is still hidden, it doesn't
@@ -51,7 +62,7 @@ void wxGLCanvasBase::SetCurrent(const wxGLContext& context) const
     context.SetCurrent(*wx_static_cast(const wxGLCanvas *, this));
 }
 
-bool wxGLCanvasBase::SetColour(const wxChar *colour)
+bool wxGLCanvasBase::SetColour(const wxString& colour)
 {
     wxColour col = wxTheColourDatabase->Find(colour);
     if ( !col.Ok() )