From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun, 15 Apr 2007 23:09:46 +0000 (+0000)
Subject: use IsShownOnScreen() in OnSize() to ensure that the window is realized (important... 
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0ce4fad6ae7a69396e73b443d7c82d69247e8931

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
---

diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp
index ac4ea82240..411979b571 100644
--- a/samples/opengl/cube/cube.cpp
+++ b/samples/opengl/cube/cube.cpp
@@ -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...)