Relax checking window visibility in wxGLCanvas::SetCurrent().
It is enough for the window to be shown for SetCurrent() to work, it doesn't have to be actually visible on screen, and checking for this using IsShownOnScreen() resulted in false positives. Closes #16193. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e9b45c0cf4
commit
e74d3e73b4
@ -56,7 +56,7 @@ bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const
|
||||
// although on MSW it works even if the window is still hidden, it doesn't
|
||||
// work in other ports (notably X11-based ones) and documentation mentions
|
||||
// that SetCurrent() can only be called for a shown window, so check for it
|
||||
wxASSERT_MSG( IsShownOnScreen(), wxT("can't make hidden GL canvas current") );
|
||||
wxASSERT_MSG( IsShown(), wxT("can't make hidden GL canvas current") );
|
||||
|
||||
|
||||
return context.SetCurrent(*static_cast<const wxGLCanvas *>(this));
|
||||
|
Loading…
Reference in New Issue
Block a user