diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-07-20 14:54:39 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-07-20 14:54:39 +0200 |
commit | 3752b1f31f8ae2603c9887b348346f80c86270c6 (patch) | |
tree | ce20ac695cd4d1f236899047355a73a562d00711 /desktop | |
parent | fbfdb48167f1a2280f72636f767c4cb2b932e3ba (diff) |
jl154 #i113285# fixing deadlock when starting OOo by the testtool
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index d701516ac361..3ab5c6cacc88 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1704,6 +1704,13 @@ void Desktop::Main() ( xSMgr->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY ); + /* ensure existance of a default window that messages can be dispatched to + This is for the benefit of testtool which uses PostUserEvent extensively + and else can deadlock while creating this window from another tread while + the main thread is not yet in the event loop. + */ + Application::GetDefaultDevice(); + // initialize test-tool library (if available) RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ tools::InitTestToolLib" ); tools::InitTestToolLib(); |