summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/opengl/TransitionerImpl.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx
index f206f2015664..bf8c23744fc3 100644
--- a/slideshow/source/engine/opengl/TransitionerImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx
@@ -314,9 +314,12 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
mpContext = OpenGLContext::Create();
- if( !mpContext->init( reinterpret_cast< vcl::Window* >( aVal ) ) ) {
+ OutputDevice* pDevice = reinterpret_cast<OutputDevice*>(aVal);
+ vcl::Window* pWindow = pDevice ? pDevice->GetOwnerWindow() : nullptr;
+
+ if( !mpContext->init( pWindow) ) {
mpContext->requestLegacyContext();
- if( !mpContext->init( reinterpret_cast< vcl::Window* >( aVal ) ) )
+ if( !mpContext->init( pWindow ) )
return false;
}
SAL_INFO("slideshow.opengl", "created the context");