From 49c2ff49746388195e25d2f222132e6424261bd8 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" <Philipp.Lohmann@Oracle.COM> Date: Mon, 8 Nov 2010 12:33:56 +0100 Subject: vcl117: #i115469# activate application if termination was canceled --- vcl/aqua/source/app/vclnsapp.mm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'vcl/aqua') 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 -- cgit