diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-11-08 12:33:56 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-11-08 12:33:56 +0100 |
commit | 49c2ff49746388195e25d2f222132e6424261bd8 (patch) | |
tree | c31b48b7dc43a56ae83ed74eff552c0dff7b16ca /vcl/aqua | |
parent | d38917161cff8b8f4f6edb622e571c3a5b5bca88 (diff) |
vcl117: #i115469# activate application if termination was canceled
Diffstat (limited to 'vcl/aqua')
-rwxr-xr-x | vcl/aqua/source/app/vclnsapp.mm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index ff2b4226bfa0..caa506772272 100755 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -360,6 +360,8 @@ { YIELD_GUARD; + NSApplicationTerminateReply aReply = NSTerminateNow; + SalData* pSalData = GetSalData(); #if 1 // currently do some really bad hack if( ! pSalData->maFrames.empty() ) @@ -399,7 +401,7 @@ #endif [(*it) release]; } - return NSTerminateCancel; + aReply = NSTerminateCancel; } #if OSL_DEBUG_LEVEL > 1 for( std::list< AquaSalFrame* >::iterator it = pSalData->maFrames.begin(); @@ -416,9 +418,12 @@ #endif } #else // the clean version follows - return pSalData->maFrames.front()->CallCallback( SALEVENT_SHUTDOWN, NULL ) ? NSTerminateCancel : NSTerminateNow; + aReply = pSalData->maFrames.front()->CallCallback( SALEVENT_SHUTDOWN, NULL ) ? NSTerminateCancel : NSTerminateNow; #endif - return NSTerminateNow; + + if( aReply != NSTerminateNow ) + [NSApp activateIgnoringOtherApps: YES]; + return aReply; } -(void)systemColorsChanged: (NSNotification*) pNotification |