summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-07 20:59:22 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-08 02:53:17 +0100
commit4201779de7441c03fbf0fea665d17ed2328970cc (patch)
tree69943bd92c00a6a71213a3cb84fcf24c7be44247 /vcl/source
parent397dd8a5f7694540f31f32759c2c915d63506ccd (diff)
Revert "Use the backend SalInstance method IsMainThread for Application::IsMainThread"
vcl/inc/unx/gtk/gtkinst.hxx's IsMainThread returns always false. This breaks in iahndl.cxx on Linux. This reverts commit bc089afb13029bae65b993992b3815430657ac24. Change-Id: I8fbd945e3704214d242f6f9e65760d44b0cc7d40 Reviewed-on: https://gerrit.libreoffice.org/63044 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/app/svmain.cxx3
2 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0d9a2770aeb8..3221804607e3 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -520,7 +520,7 @@ comphelper::SolarMutex& Application::GetSolarMutex()
bool Application::IsMainThread()
{
- return ImplGetSVData()->mpDefInst->IsMainThread();
+ return ImplGetSVData()->mnMainThreadId == osl::Thread::getCurrentIdentifier();
}
sal_uInt32 Application::ReleaseSolarMutex()
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 86db558da3e9..673e800e4ac4 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -302,6 +302,9 @@ bool InitVCL()
ImplSVData* pSVData = ImplGetSVData();
+ // remember Main-Thread-Id
+ pSVData->mnMainThreadId = ::osl::Thread::getCurrentIdentifier();
+
// Initialize Sal
pSVData->mpDefInst = CreateSalInstance();
if ( !pSVData->mpDefInst )