diff options
-rw-r--r-- | vcl/inc/win/salinst.h | 1 | ||||
-rw-r--r-- | vcl/win/app/salinst.cxx | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h index c62a68ae0455..35f2365fb166 100644 --- a/vcl/inc/win/salinst.h +++ b/vcl/inc/win/salinst.h @@ -43,6 +43,7 @@ public: WinSalInstance(); virtual ~WinSalInstance() override; + virtual void AfterAppInit() override; virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override; virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override; virtual void DestroyFrame( SalFrame* pFrame ) override; diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index b903247d2d85..5ba2f9cd50e6 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -458,6 +458,15 @@ WinSalInstance::~WinSalInstance() #endif } +void WinSalInstance::AfterAppInit() +{ +// (1) Ideally this would be done at the place that creates the thread, but since this thread is normally +// just the default/main thread, that is not possible. +// (2) Don't do this on unix, where it causes tools like pstree on Linux to +// confusingly report soffice.bin as VCL Main instead. + osl_setThreadName("VCL Main"); +} + static LRESULT ImplSalDispatchMessage( const MSG* pMsg ) { SalData* pSalData = GetSalData(); |