use IsShownOnScreen() in OnSize() to ensure that the window is realized (important for X11-based ports) before trying to create an associated context
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -304,7 +304,7 @@ void TestGLCanvas::OnSize(wxSizeEvent& event)
|
||||
// don't prevent default processing from taking place
|
||||
event.Skip();
|
||||
|
||||
if ( !IsShown() )
|
||||
if ( !IsShownOnScreen() )
|
||||
return;
|
||||
|
||||
// set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
|
||||
|
Reference in New Issue
Block a user