vcl/headless/svpinst.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 0c747cec819222e392d6e849434e63e760a94ee6 Author: Stephan Bergmann <stephan.bergm...@collabora.com> AuthorDate: Wed Jun 18 16:23:23 2025 +0200 Commit: Stephan Bergmann <stephan.bergm...@collabora.com> CommitDate: Wed Jun 25 22:47:01 2025 +0200 Emscripten --disable-gui: Improve waiting yield This call to ImplYield (with bWait = false) had been added in 858fed2a98ad5a04ca65dc504722e2db52746e64 "Emscripten: Support --disable-gui", and calling it with bWait = false ensures that e.g. <https://github.com/allotropia/zetajs/tree/main/examples/convertpdf>, when running against a --disable-gui LO build, does not deadlock. But for use cases involving LOK, it instead needs to be called with bWait = true, as does the normal Application::Yield in vcl/source/app/svapp.cxx: Otherwise, the code at <https://github.com/CollaboraOnline/online/tree/master/wasm> would never proceed past the > if (!bMustSleep && !comphelper::LibreOfficeKit::anyInput()) > return bWasEvent; in SvpSalInstance::ImplYield. Change-Id: I985a75bea042b3191d95fef96a5430faeb6a521e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186665 Reviewed-by: Stephan Bergmann <stephan.bergm...@collabora.com> Tested-by: Jenkins (cherry picked from commit c632d05749003e968bbbb422ffc77785ae685e32) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186987 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 0b65626947aa..267c5335a896 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -54,6 +54,7 @@ #if defined EMSCRIPTEN #include <emscripten.h> +#include <comphelper/lok.hxx> #endif SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr; @@ -284,7 +285,7 @@ void SvpSalInstance::ProcessEvent( SalUserEvent aEvent ) static void loop(void * arg) { SolarMutexGuard g; - static_cast<SvpSalInstance *>(arg)->ImplYield(false, false); + static_cast<SvpSalInstance *>(arg)->ImplYield(comphelper::LibreOfficeKit::isActive(), false); } bool SvpSalInstance::DoExecute(int &) {