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
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fc4f2aa..ac82e29 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;