diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-16 01:46:04 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-16 11:19:35 +0300 |
commit | bd2a91420e4cea477e4317223092b1db5ff09c7f (patch) | |
tree | b02fd21e4782513d2c8bc09e175d104d43cf9f1d /vcl/ios/iosinst.cxx | |
parent | e013425372a34afa91fb312d8237b2ce22147d81 (diff) |
Try to propagate display size change to LO
Change-Id: If52c0aa9290c377c08f2cec8c9e36d987c0ed9b6
Diffstat (limited to 'vcl/ios/iosinst.cxx')
-rw-r--r-- | vcl/ios/iosinst.cxx | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 920187c1aa1f..95a7aacbe6fe 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -271,12 +271,36 @@ int IosSalSystem::ShowNativeDialog( const OUString& rTitle, return 0; } +IMPL_LINK( IosSalInstance, DisplayConfigurationChanged, void*, ) +{ + for( std::list< SalFrame* >::const_iterator it = getFrames().begin(); + it != getFrames().end(); + it++ ) { + (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, 0 ); + } + + lo_damaged( CGRectMake( 0, 0, viewWidth, viewHeight ) ); + return 0; +} + extern "C" void lo_set_view_size(int width, int height) { - // Horrible + int oldWidth = viewWidth; + viewWidth = width; viewHeight = height; + + if (oldWidth > 1) { + // Inform about change in display size (well, just orientation + // presumably). + IosSalInstance *pInstance = IosSalInstance::getInstance(); + + if ( pInstance == NULL ) + return; + + Application::PostUserEvent( LINK( pInstance, IosSalInstance, DisplayConfigurationChanged ), NULL ); + } } IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) |