diff options
author | Andras Timar <andras.timar@collabora.com> | 2018-11-05 18:17:05 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-11-13 21:06:44 +0100 |
commit | 71c6a308035eb687f8fd8823c1e16670ad2a450b (patch) | |
tree | acd9aa72f43f74695d879defedc0b606aa8f72b3 | |
parent | a3b3eea394a5e6388e84d69f32721d11c2e7b2be (diff) |
LOK: update main thread
Change-Id: I75df6ae9f9fb41b08a8774ce026f79fdd120b629
Reviewed-on: https://gerrit.libreoffice.org/62921
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 6f076e75b2adb4628ee3cea311781c40f219bba7)
-rw-r--r-- | desktop/source/lib/init.cxx | 2 | ||||
-rw-r--r-- | include/vcl/svapp.hxx | 3 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 10e81de091e5..7637f764b46d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3630,6 +3630,8 @@ static void lo_startmain(void*) if (GetpApp()) Application::GetSolarMutex().tryToAcquire(); + Application::UpdateMainThread(); + soffice_main(); } diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 9b930b3127d9..014850eba019 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -1355,6 +1355,9 @@ public: static void ShowNativeErrorBox(const OUString& sTitle , const OUString& sMessage); + /** Update main thread identifier */ + static void UpdateMainThread(); + /** Do we have a native / system file selector available? @returns True if native file selector is available, false otherwise. diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index e08adff710e3..c412728cd6a4 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1383,6 +1383,13 @@ void Application::SetHelp( Help* pHelp ) ImplGetSVData()->maAppData.mpHelp = pHelp; } +void Application::UpdateMainThread() +{ + ImplSVData* pSVData = ImplGetSVData(); + if (pSVData) + pSVData->mnMainThreadId = osl::Thread::getCurrentIdentifier(); +} + Help* Application::GetHelp() { return ImplGetSVData()->maAppData.mpHelp; |