remove unnecessary m_glWidget, fix return types for realize and map callbacks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,7 +92,6 @@ public:
|
|||||||
// implementation from now on
|
// implementation from now on
|
||||||
void OnInternalIdle();
|
void OnInternalIdle();
|
||||||
|
|
||||||
GtkWidget *m_glWidget;
|
|
||||||
bool m_exposed;
|
bool m_exposed;
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_8
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
|
@@ -33,12 +33,10 @@
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static gint
|
static void
|
||||||
gtk_glwindow_realized_callback( GtkWidget *WXUNUSED(widget), wxGLCanvas *win )
|
gtk_glwindow_realized_callback( GtkWidget *WXUNUSED(widget), wxGLCanvas *win )
|
||||||
{
|
{
|
||||||
win->GTKInitImplicitContext();
|
win->GTKInitImplicitContext();
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +47,7 @@ gtk_glwindow_realized_callback( GtkWidget *WXUNUSED(widget), wxGLCanvas *win )
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static gint
|
static void
|
||||||
gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
|
gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
|
||||||
{
|
{
|
||||||
wxPaintEvent event( win->GetId() );
|
wxPaintEvent event( win->GetId() );
|
||||||
@@ -58,8 +56,6 @@ gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
|
|||||||
|
|
||||||
win->m_exposed = false;
|
win->m_exposed = false;
|
||||||
win->GetUpdateRegion().Clear();
|
win->GetUpdateRegion().Clear();
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,9 +218,7 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
|||||||
|
|
||||||
wxWindow::Create( parent, id, pos, size, style, name );
|
wxWindow::Create( parent, id, pos, size, style, name );
|
||||||
|
|
||||||
m_glWidget = m_wxwindow;
|
gtk_widget_set_double_buffered(m_wxwindow, false);
|
||||||
|
|
||||||
gtk_widget_set_double_buffered( m_glWidget, FALSE );
|
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_8
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
g_signal_connect(m_wxwindow, "realize", G_CALLBACK(gtk_glwindow_realized_callback), this);
|
g_signal_connect(m_wxwindow, "realize", G_CALLBACK(gtk_glwindow_realized_callback), this);
|
||||||
|
Reference in New Issue
Block a user