From 0ce4fad6ae7a69396e73b443d7c82d69247e8931 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 15 Apr 2007 23:09:46 +0000 Subject: [PATCH] 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 --- samples/opengl/cube/cube.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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...) -- 2.45.2