X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3780e2523c2647a6519a774424cfa3eaaafc60be..01b5ad3b500627ae3ebadc755f47c816a859e6bb:/src/gtk/glcanvas.cpp diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp index cb261d2702..2525acf3e9 100644 --- a/src/gtk/glcanvas.cpp +++ b/src/gtk/glcanvas.cpp @@ -33,12 +33,10 @@ //----------------------------------------------------------------------------- extern "C" { -static gint +static void gtk_glwindow_realized_callback( GtkWidget *WXUNUSED(widget), wxGLCanvas *win ) { win->GTKInitImplicitContext(); - - return FALSE; } } @@ -49,7 +47,7 @@ gtk_glwindow_realized_callback( GtkWidget *WXUNUSED(widget), wxGLCanvas *win ) //----------------------------------------------------------------------------- extern "C" { -static gint +static void gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win ) { wxPaintEvent event( win->GetId() ); @@ -58,8 +56,6 @@ gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win ) win->m_exposed = false; win->GetUpdateRegion().Clear(); - - return FALSE; } } @@ -161,6 +157,9 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent, const wxPalette& palette) : m_createImplicitContext(true) { + m_sharedContext = NULL; + m_sharedContextOf = NULL; + Create(parent, id, pos, size, style, name, attribList, palette); } @@ -175,7 +174,7 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent, const wxPalette& palette) : m_createImplicitContext(true) { - m_sharedContext = wx_const_cast(wxGLContext *, shared); + m_sharedContext = const_cast(shared); Create(parent, id, pos, size, style, name, attribList, palette); } @@ -189,7 +188,8 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent, const wxPalette& palette ) : m_createImplicitContext(true) { - m_sharedContextOf = wx_const_cast(wxGLCanvas *, shared); + m_sharedContext = NULL; + m_sharedContextOf = const_cast(shared); Create(parent, id, pos, size, style, name, attribList, palette); } @@ -205,7 +205,7 @@ bool wxGLCanvas::Create(wxWindow *parent, const int *attribList, const wxPalette& WXUNUSED_UNLESS_DEBUG(palette)) { - wxASSERT_MSG( !palette.IsOk(), _T("palettes not supported") ); + wxASSERT_MSG( !palette.IsOk(), wxT("palettes not supported") ); m_exposed = false; m_noExpose = true; @@ -222,9 +222,7 @@ bool wxGLCanvas::Create(wxWindow *parent, wxWindow::Create( parent, id, pos, size, style, name ); - m_glWidget = m_wxwindow; - - gtk_widget_set_double_buffered( m_glWidget, FALSE ); + gtk_widget_set_double_buffered(m_wxwindow, false); #if WXWIN_COMPATIBILITY_2_8 g_signal_connect(m_wxwindow, "realize", G_CALLBACK(gtk_glwindow_realized_callback), this);