[Libreoffice-commits] core.git: Branch 'libreoffice-6-1-3' - vcl/win
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 19 12:54:50 UTC 2018
vcl/win/gdi/salprn.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 765e019e2d4be851096e70b943f01dd021545e3c
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Sep 11 14:02:22 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Oct 19 14:53:12 2018 +0200
tdf#118690 don't try to process all messages
Regression from commit 221b0ab1245b ("WIN use Reschedule instead
of own dispatch loops"). This limit the maximum reschedule loops
as the original code did. There is still a busy loop when opening
the print dialog, as it was before the patch, but this at least
gets printing started.
Change-Id: If867329b82b13c898bb15b08584244084488a66c
Reviewed-on: https://gerrit.libreoffice.org/60310
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
(cherry picked from commit 79cb9ef524c3a6b058019da5ca6acfad7a895bf2)
Reviewed-on: https://gerrit.libreoffice.org/60941
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 376a4c754a2bf95b3033b88d68e98a562ba8632b)
Reviewed-on: https://gerrit.libreoffice.org/61655
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index a682f9d33f0a..584bc83087df 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1295,6 +1295,7 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
{
SalData* pSalData = GetSalData();
WinSalPrinter* pPrinter;
+ int i = 0;
bool bWhile = true;
// Ensure we handle the mutex which will be released in WinSalInstance::DoYield
@@ -1303,6 +1304,10 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
{
// process messages
bWhile = Application::Reschedule( true );
+ if (i > 15)
+ bWhile = false;
+ else
+ ++i;
pPrinter = pSalData->mpFirstPrinter;
while ( pPrinter )
@@ -1465,7 +1470,7 @@ bool WinSalPrinter::StartJob( const OUString* pFileName,
// As the Telecom Balloon Fax driver tends to send messages repeatedly
// we try to process first all, and then insert a dummy message
- while ( Application::Reschedule( true ) );
+ for (int i = 0; Application::Reschedule( true ) && i <= 15; ++i);
BOOL const ret = PostMessageW(GetSalData()->mpInstance->mhComWnd, SAL_MSG_DUMMY, 0, 0);
SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!");
More information about the Libreoffice-commits
mailing list