X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45b5751fb4013f2ab8db47c5fe4ac533ab324864..a6aa9b1ee8aaecdf0ca4618c2e6cccfb011f4599:/utils/glcanvas/samples/penguin/penguin.cpp?ds=inline diff --git a/utils/glcanvas/samples/penguin/penguin.cpp b/utils/glcanvas/samples/penguin/penguin.cpp index e1100c508c..8eaed6a1d9 100644 --- a/utils/glcanvas/samples/penguin/penguin.cpp +++ b/utils/glcanvas/samples/penguin/penguin.cpp @@ -76,11 +76,6 @@ void MyFrame::OnExit(wxCommandEvent& event) Destroy(); } -bool MyFrame::OnClose(void) -{ - return TRUE; -} - BEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas) EVT_SIZE(TestGLCanvas::OnSize) EVT_PAINT(TestGLCanvas::OnPaint) @@ -106,7 +101,9 @@ void TestGLCanvas::OnPaint( wxPaintEvent& event ) /* must always be here */ wxPaintDC dc(this); +#ifndef __WXMOTIF__ if (!GetContext()) return; +#endif SetCurrent(); @@ -148,8 +145,10 @@ void TestGLCanvas::OnSize(wxSizeEvent& event) { int width, height; GetClientSize(& width, & height); - + +#ifndef __WXMOTIF__ if (GetContext()) +#endif { SetCurrent(); glViewport(0, 0, width, height); @@ -197,7 +196,7 @@ void TestGLCanvas::OnMouse( wxMouseEvent& event ) add_quats( spin_quat, info.quat, info.quat ); /* orientation has changed, redraw mesh */ - Refresh(); + Refresh(FALSE); } info.beginx = event.GetX();