diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2024-04-19 21:13:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-27 11:33:17 +0200 |
commit | e4176371a0aa9c2364a9f6cffaaaaf82711c1b72 (patch) | |
tree | 424b21420abcecaeae6f15594cc37730211c1630 /desktop/source | |
parent | 2cad06de3f7d9b6a6a9b4365badc40bcc9f24649 (diff) |
lok: ensure our 'main thread' concept is updated post-fork.
Otherwise we fall foul of assertions and behavioral differences
around the main thread as the new forked main-thread has a
different thread-id.
Change-Id: I0bd97e5173767ac6c697326aaf0d0822037e480f
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166319
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit ddeec9754cb2871a709d22efb460e141ab4c6f33)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172453
Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1a9fc79e621d..d7b7f9f3d429 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3491,6 +3491,8 @@ static void lo_startThreads(LibreOfficeKit* /* pThis */) static void lo_setForkedChild(LibreOfficeKit* /* pThis */, bool bIsChild) { comphelper::LibreOfficeKit::setForkedChild(bIsChild); + if (bIsChild) + Application::UpdateMainThread(); } static void lo_registerCallback (LibreOfficeKit* pThis, |