X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c40f44babbf6230b3c47ccc2d0e947d00b7075df..7ba7c4e62f008c640f8284de3e61c63882faeb9a:/src/mac/carbon/glcanvas.cpp diff --git a/src/mac/carbon/glcanvas.cpp b/src/mac/carbon/glcanvas.cpp index e6a8b50a69..e64e4c01e3 100644 --- a/src/mac/carbon/glcanvas.cpp +++ b/src/mac/carbon/glcanvas.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: glcanvas.cpp -// Purpose: wxGLCanvas, for using OpenGL with wxWindows under Macintosh +// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 @@ -9,18 +9,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "glcanvas.h" -#endif - #include "wx/wxprec.h" #if defined(__BORLANDC__) #pragma hdrstop #endif -#include "wx/setup.h" - #if wxUSE_GLCANVAS #ifndef WX_PRECOMP @@ -219,6 +213,8 @@ bool wxGLCanvas::Create(wxWindow *parent, const wxGLContext *shared, wxWindowID const wxPoint& pos, const wxSize& size, long style, const wxString& name, int *attribList, const wxPalette& palette) { + m_macCanvasIsShown = false ; + m_glContext = 0 ; wxWindow::Create( parent, id, pos, size, style, name ); AGLPixelFormat fmt = ChoosePixelFormat(attribList); @@ -331,7 +327,7 @@ bool wxGLCanvas::Show(bool show) } else { - if ( IsControlVisible( (ControlRef) m_macControl ) && !m_macCanvasIsShown ) + if ( m_peer->IsVisible()&& !m_macCanvasIsShown ) { m_macCanvasIsShown = true ; SetViewport() ; @@ -343,7 +339,7 @@ bool wxGLCanvas::Show(bool show) void wxGLCanvas::MacVisibilityChanged() { - if ( !IsControlVisible( (ControlRef) m_macControl ) ) + if ( !MacIsReallyShown() ) { if ( m_macCanvasIsShown ) {