diff options
Diffstat (limited to 'vcl/aqua/source/app/vclnsapp.mm')
-rw-r--r-- | vcl/aqua/source/app/vclnsapp.mm | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index e103a6b3e387..2424d373b24e 100644 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -458,37 +458,51 @@ - (void)applicationWillBecomeActive:(NSNotification *)pNotification { (void)pNotification; - if (GetSalData()->mpMainController->remoteControl) { - + SalData* pSalData = GetSalData(); + if (pSalData->mpMainController->remoteControl) + { // [remoteControl startListening: self]; // does crash because the right thing to do is // [GetSalData()->mpMainController->remoteControl startListening: self]; // but the instance variable 'remoteControl' is declared protected // workaround : declare remoteControl instance variable as public in RemoteMainController.m - [GetSalData()->mpMainController->remoteControl startListening: self]; + [pSalData->mpMainController->remoteControl startListening: self]; #ifdef DEBUG NSLog(@"Apple Remote will become active - Using remote controls"); #endif } + for( std::list< AquaSalFrame* >::const_iterator it = pSalData->maPresentationFrames.begin(); + it != pSalData->maPresentationFrames.end(); ++it ) + { + [(*it)->mpWindow setLevel: NSPopUpMenuWindowLevel]; + if( [(*it)->mpWindow isVisible] ) + [(*it)->mpWindow orderFront: NSApp]; + } } - (void)applicationWillResignActive:(NSNotification *)pNotification { (void)pNotification; - if (GetSalData()->mpMainController->remoteControl) { - + SalData* pSalData = GetSalData(); + if (pSalData->mpMainController->remoteControl) + { // [remoteControl stopListening: self]; // does crash because the right thing to do is // [GetSalData()->mpMainController->remoteControl stopListening: self]; // but the instance variable 'remoteControl' is declared protected // workaround : declare remoteControl instance variable as public in RemoteMainController.m - [GetSalData()->mpMainController->remoteControl stopListening: self]; + [pSalData->mpMainController->remoteControl stopListening: self]; #ifdef DEBUG NSLog(@"Apple Remote will resign active - Releasing remote controls"); #endif } + for( std::list< AquaSalFrame* >::const_iterator it = pSalData->maPresentationFrames.begin(); + it != pSalData->maPresentationFrames.end(); ++it ) + { + [(*it)->mpWindow setLevel: NSNormalWindowLevel]; + } } - (BOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (BOOL) bWinVisible |