diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-07 20:59:22 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-08 02:53:17 +0100 |
commit | 4201779de7441c03fbf0fea665d17ed2328970cc (patch) | |
tree | 69943bd92c00a6a71213a3cb84fcf24c7be44247 /vcl/source | |
parent | 397dd8a5f7694540f31f32759c2c915d63506ccd (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.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/svmain.cxx | 3 |
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 ) |