summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-02-22 12:40:26 +0200
committerMichael Meeks <michael.meeks@collabora.com>2018-02-22 22:44:07 +0100
commit42a5a054b70c7850ca47074c2d5dd249de3202b4 (patch)
treef18647e031a9ae1e3931864036d428550031e1eb /vcl/source
parent0de921a90343a7b35612fdf85ae69657f1eefe82 (diff)
tdf#103690: Set up notifications only after VCL has been initialised
On some Macs, it seems that LibreOffice (or any app?) gets an NSApplicationDidChangeScreenParametersNotification as soon as it has started and asked for such a notification. Our handler for that notification assumes that VCL is initialised. Thus we should not ask for such notifications before VCL has been initialised. I could not reproduce the reported crash with an unmodified LibreOffice, only after inserting a sleep after the notifications had been set up. But I am fairly sure this change fixes the problem. Change-Id: I18d342eb7dc0c77cb7fc8623756bead65a1bd329 Reviewed-on: https://gerrit.libreoffice.org/50164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/50197 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/svmain.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index e4b1468eecec..2d33836aea62 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -187,6 +187,10 @@ int ImplSVMain()
bool bInit = isInitVCL() || InitVCL();
+#ifdef MACOSX
+ postInitVCLinitNSApp();
+#endif
+
if( bInit )
{
// call application main