From 5dec457207c7fff488f667b128f2493b18bd033e Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 6 Apr 2006 14:43:01 +0000 Subject: INTEGRATION: CWS vcl56 (1.22.62); FILE MERGED 2006/03/14 17:32:31 pl 1.22.62.1: #i54419# release and reacquire yield mutex over EndDoc call --- vcl/win/source/gdi/salprn.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vcl') diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 8ce66998fd14..77cafab791e1 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -1522,8 +1522,17 @@ BOOL WinSalPrinter::EndJob() mpGraphics = NULL; } + // #i54419# Windows fax printer brings up a dialog in EndDoc + // which text previously copied in soffice process can be + // pasted to -> deadlock due to mutex not released. + // it should be safe to release the yield mutex over the EndDoc + // call, however the real solution is supposed to be the threading + // framework yet to come. + SalData* pSalData = GetSalData(); + ULONG nAcquire = pSalData->mpFirstInstance->ReleaseYieldMutex(); if( ::EndDoc( hDC ) <= 0 ) err = GetLastError(); + pSalData->mpFirstInstance->AcquireYieldMutex( nAcquire ); DeleteDC( hDC ); } -- cgit