diff options
author | Tor Lillqvist <tml@collabora.com> | 2019-05-14 10:20:50 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2019-05-16 13:24:42 +0300 |
commit | b693fb5cf154b177dd03184c789a4ef6b2aaa833 (patch) | |
tree | 4cc52925d829a19204d391cbc6e7f7beacbd5d95 /desktop | |
parent | e10cd7b8bf180ec2769ea82f537fd3bc98d2cee3 (diff) |
We apparently need to drop the Solar Mutex when exiting lo_runLoop() on iOS
It seems to be held after soffice_main() returns for the first
document opened, but not subsequent ones, for some reason. So acquire
it an extra time to be able to use Application::ReleaseSolarMutex()...
Without this, when opening a subsequent document, the loleaflet
loading progress bar just hangs.
Change-Id: I4e4e7b814f0dba836b790b6f68470aab54f8bbb9
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fc4f2aa4881c..ac82e295546f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -4524,13 +4524,20 @@ static void lo_runLoop(LibreOfficeKit* /*pThis*/, { #ifdef IOS // Maybe ANDROID, too? InitVCL(); + Application::GetSolarMutex().acquire(); #endif - SolarMutexGuard aGuard; + { + SolarMutexGuard aGuard; - vcl::lok::registerPollCallbacks(pPollCallback, pWakeCallback, pData); - Application::UpdateMainThread(); - soffice_main(); + vcl::lok::registerPollCallbacks(pPollCallback, pWakeCallback, pData); + Application::UpdateMainThread(); + soffice_main(); + } +#ifdef IOS // ANDROID, too? + vcl::lok::unregisterPollCallbacks(); + Application::ReleaseSolarMutex(); +#endif } static bool bInitialized = false; |