diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-05-09 08:46:58 -0500 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-11 08:14:56 +0000 |
commit | 5d00f1b0918dc067e0d22809f93b0491bbcee0a9 (patch) | |
tree | 47c5b0ea13aae8f9811364573f2e5972efb954b2 /vcl | |
parent | 9f8d11eb2b356ae86d3be3934a3673d034a9d966 (diff) |
invoke sal_detail_deinitialized() on MacOSX too
LibreOffice.app on Mac, eventually call NSApplicationMain()
which never return.. so the sal_detail_deinitialize()
call intented by SAL_IMPLEMENT_MAIN*() is bypassed.
This will attempt to call it, as late as possible in the NSApplication
lifecycle.
Change-Id: I5cb63bfaeafb784a0fee356ff843b332d8e31932
Reviewed-on: https://gerrit.libreoffice.org/15684
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/osx/vclnsapp.h | 1 | ||||
-rw-r--r-- | vcl/osx/vclnsapp.mm | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/vcl/inc/osx/vclnsapp.h b/vcl/inc/osx/vclnsapp.h index 541b509946a1..c899ffce59d1 100644 --- a/vcl/inc/osx/vclnsapp.h +++ b/vcl/inc/osx/vclnsapp.h @@ -47,6 +47,7 @@ class AquaSalFrame; -(BOOL)application: (NSApplication*) app printFile: (NSString*)file; -(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(BOOL)bShowPrintPanels; -(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app; +-(void)applicationWillTerminate: (NSNotification *) aNotification; -(void)systemColorsChanged: (NSNotification*) pNotification; -(void)screenParametersChanged: (NSNotification*) pNotification; -(void)scrollbarVariantChanged: (NSNotification*) pNotification; diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm index d1d086f414d1..f7c9a4b14627 100644 --- a/vcl/osx/vclnsapp.mm +++ b/vcl/osx/vclnsapp.mm @@ -20,7 +20,7 @@ #include <config_features.h> #include "sal/config.h" - +#include "sal/main.h" #include <vector> #include "vcl/window.hxx" @@ -384,6 +384,12 @@ return NSPrintingSuccess; } +-(void)applicationWillTerminate: (NSNotification *) aNotification +{ + (void)aNotification; + sal_detail_deinitialize(); +} + -(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app { (void)app; |