From bc089afb13029bae65b993992b3815430657ac24 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Tue, 6 Nov 2018 11:51:45 +0100 Subject: Use the backend SalInstance method IsMainThread for Application::IsMainThread Change-Id: I3258268b12cb0914a5e8d1c9b57d7891e83080c6 Reviewed-on: https://gerrit.libreoffice.org/62951 Reviewed-by: Michael Meeks Tested-by: Jenkins --- vcl/inc/svdata.hxx | 1 - vcl/source/app/svapp.cxx | 2 +- vcl/source/app/svmain.cxx | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) (limited to 'vcl') diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index b36ecf7e6a41..62f07929e031 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -363,7 +363,6 @@ struct ImplSVData std::unique_ptr mpDockingManager; std::unique_ptr mpBlendFrameCache; - oslThreadIdentifier mnMainThreadId = 0; rtl::Reference< vcl::DisplayConnectionDispatch > mxDisplayConnection; css::uno::Reference< css::lang::XComponent > mxAccessBridge; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 3221804607e3..0d9a2770aeb8 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()->mnMainThreadId == osl::Thread::getCurrentIdentifier(); + return ImplGetSVData()->mpDefInst->IsMainThread(); } sal_uInt32 Application::ReleaseSolarMutex() diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 673e800e4ac4..86db558da3e9 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -302,9 +302,6 @@ bool InitVCL() ImplSVData* pSVData = ImplGetSVData(); - // remember Main-Thread-Id - pSVData->mnMainThreadId = ::osl::Thread::getCurrentIdentifier(); - // Initialize Sal pSVData->mpDefInst = CreateSalInstance(); if ( !pSVData->mpDefInst ) -- cgit