diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-01-14 17:52:17 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-01-14 17:52:17 +0100 |
commit | 00e25d18b9aec1da5dc4edd4f8e1980bc5c91eaa (patch) | |
tree | 47102f2d4947fd154137acafca1c5f44c67c24ff | |
parent | dcbaee1e7d51a7645ce5236b9c8d78736a51c326 (diff) | |
parent | f8a276a66211d0fe08e1c9ad5204d5fe0a0fc038 (diff) |
CWS-TOOLING: integrate CWS dba32k_DEV300
-rw-r--r-- | vcl/source/helper/xconnection.cxx | 36 | ||||
-rw-r--r-- | vcl/unx/source/app/saldisp.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/source/plugadapt/salplug.cxx | 4 |
3 files changed, 36 insertions, 10 deletions
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx index 477ff5fb9902..489e3cf9340e 100644 --- a/vcl/source/helper/xconnection.cxx +++ b/vcl/source/helper/xconnection.cxx @@ -30,10 +30,31 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include <svsys.h> -#include <vcl/xconnection.hxx> -#include <vcl/svdata.hxx> -#include <vcl/salinst.hxx> + +#include "svsys.h" +#include "vcl/xconnection.hxx" +#include "vcl/svdata.hxx" +#include "vcl/salinst.hxx" +#include "vcl/svapp.hxx" + +namespace vcl +{ + class SolarMutexReleaser + { + ULONG mnReleased; + public: + SolarMutexReleaser() + { + mnReleased = Application::ReleaseSolarMutex(); + } + + ~SolarMutexReleaser() + { + if( mnReleased ) + Application::AcquireSolarMutex( mnReleased ); + } + }; +} using namespace rtl; using namespace osl; @@ -41,6 +62,7 @@ using namespace vcl; using namespace com::sun::star::uno; using namespace com::sun::star::awt; + DisplayConnection::DisplayConnection() { ImplSVData* pSVData = ImplGetSVData(); @@ -108,6 +130,8 @@ Any SAL_CALL DisplayConnection::getIdentifier() throw() void DisplayConnection::dispatchDowningEvent() { + SolarMutexReleaser aRel; + MutexGuard aGuard( m_aMutex ); Any aEvent; std::list< Reference< XEventHandler > > aLocalList( m_aHandlers ); @@ -117,6 +141,8 @@ void DisplayConnection::dispatchDowningEvent() bool DisplayConnection::dispatchEvent( void* pThis, void* pData, int nBytes ) { + SolarMutexReleaser aRel; + DisplayConnection* This = (DisplayConnection*)pThis; MutexGuard aGuard( This->m_aMutex ); @@ -131,6 +157,8 @@ bool DisplayConnection::dispatchEvent( void* pThis, void* pData, int nBytes ) bool DisplayConnection::dispatchErrorEvent( void* pThis, void* pData, int nBytes ) { + SolarMutexReleaser aRel; + DisplayConnection* This = (DisplayConnection*)pThis; MutexGuard aGuard( This->m_aMutex ); diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx index cfd568ac9b6c..558ae3714358 100644 --- a/vcl/unx/source/app/saldisp.cxx +++ b/vcl/unx/source/app/saldisp.cxx @@ -2304,11 +2304,7 @@ long SalX11Display::Dispatch( XEvent *pEvent ) return 0; SalInstance* pInstance = GetSalData()->m_pInstance; - if( pInstance->GetEventCallback() ) - { - YieldMutexReleaser aReleaser; - pInstance->CallEventCallback( pEvent, sizeof( XEvent ) ); - } + pInstance->CallEventCallback( pEvent, sizeof( XEvent ) ); switch( pEvent->type ) { diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx index f1c63b8abee7..08820b2cb7f9 100644 --- a/vcl/unx/source/plugadapt/salplug.cxx +++ b/vcl/unx/source/plugadapt/salplug.cxx @@ -219,8 +219,10 @@ SalInstance *CreateSalInstance() if( !(pUsePlugin && *pUsePlugin) ) pInst = check_headless_plugin(); + else + pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) ); - if( ! pInst && !(pUsePlugin && *pUsePlugin) ) + if( ! pInst ) pInst = autodetect_plugin(); // fallback to gen |