diff options
-rw-r--r-- | vcl/aqua/source/gdi/salvd.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index 109b3fb94d0f..e4d5df30fd8d 100644 --- a/vcl/aqua/source/gdi/salvd.cxx +++ b/vcl/aqua/source/gdi/salvd.cxx @@ -182,11 +182,18 @@ sal_Bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) } else { - // default to a NSView target context, any will do + // default to a NSView target context AquaSalFrame* pSalFrame = mpGraphics->getGraphicsFrame(); if( !pSalFrame || !AquaSalFrame::isAlive( pSalFrame )) + { if( !GetSalData()->maFrames.empty() ) + { + // get the first matching frame pSalFrame = *GetSalData()->maFrames.begin(); + // update the frame reference + mpGraphics->setGraphicsFrame( pSalFrame ); + } + } if( pSalFrame ) { // #i91990# |