summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2024-07-02 16:03:47 +0100
committerMichael Meeks <michael.meeks@collabora.com>2024-07-03 05:24:17 +0200
commit2456746bc20796c20d23498967e0b3a976decc54 (patch)
tree7539d512812a03db5dcf556d221df55d9244447d /toolkit
parent6adfa5811d4dc65b28544169825b88846bc55596 (diff)
lok: Avoid launching an un-necessary thread.
It seems this happens rather regularly with online; and yet we are running the main-loop, seems this was introduced to allow UNO usage without a main-loop, but this is not really our case. cf. commit 168a67f4b3ace8c4b46567651429e956547bc1f9 Author: mm <mm@openoffice.org> Date: Thu Feb 22 17:22:48 2001 +0000 VCL without main Change-Id: Ibd10a4966157f30557eff88c124e63ffae2e1f61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169821 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index ecf3605c9e9c..9e9c547e4ba6 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -136,6 +136,7 @@
#endif
#include <awt/vclxspinbutton.hxx>
#include <tools/debug.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <comphelper/interfacecontainer4.hxx>
#include <comphelper/processfactory.hxx>
@@ -928,7 +929,8 @@ VCLXToolkit::VCLXToolkit():
#ifndef IOS
osl::Guard< osl::Mutex > aGuard( getInitMutex() );
nVCLToolkitInstanceCount++;
- if( ( nVCLToolkitInstanceCount == 1 ) && ( !Application::IsInMain() ) )
+ if( nVCLToolkitInstanceCount == 1 && !Application::IsInMain() &&
+ !comphelper::LibreOfficeKit::isActive() )
{
// setup execute thread
CreateMainLoopThread( ToolkitWorkerFunction, this );