X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35f1f4f7ea3c88fa680ba69de487f67967ac51d1..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/common/glcmn.cpp diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index 0d85eab14c..07db44d4c8 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -52,14 +52,14 @@ wxGLCanvasBase::wxGLCanvasBase() SetBackgroundStyle(wxBG_STYLE_CUSTOM); } -void wxGLCanvasBase::SetCurrent(const wxGLContext& context) const +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(), _T("can't make hidden GL canvas current") ); - context.SetCurrent(*wx_static_cast(const wxGLCanvas *, this)); + return context.SetCurrent(*wx_static_cast(const wxGLCanvas *, this)); } bool wxGLCanvasBase::SetColour(const wxString& colour)