From 268b5555ac8af234c60f4b6082c84a76055f796d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 6 Jan 2001 00:35:37 +0000 Subject: [PATCH] Don't call QueryAbort16() in WriteSpool16(), since it might be called with locks held (and we do not need to call it here). --- dlls/gdi/printdrv.c | 10 ++++++++++ include/wine/wingdi16.h | 1 + 2 files changed, 11 insertions(+) diff --git a/dlls/gdi/printdrv.c b/dlls/gdi/printdrv.c index 104bc7669fd..c8a33b79d40 100644 --- a/dlls/gdi/printdrv.c +++ b/dlls/gdi/printdrv.c @@ -193,6 +193,11 @@ INT WINAPI EndPage(HDC hdc) else ret = Escape(hdc, NEWFRAME, 0, 0, 0); GDI_ReleaseObj( hdc ); + if (!QueryAbort16( hdc, 0 )) + { + EndDoc( hdc ); + ret = 0; + } return ret; } @@ -604,6 +609,10 @@ INT16 WINAPI WriteSpool16(HPJOB16 hJob, LPSTR lpData, INT16 cch) nRet = SP_OUTOFDISK; else nRet = cch; +#if 0 + /* FIXME: We just cannot call 16 bit functions from here, since we + * have acquired several locks (DC). And we do not really need to. + */ if (pPrintJob->hDC == 0) { TRACE("hDC == 0 so no QueryAbort\n"); } @@ -612,6 +621,7 @@ INT16 WINAPI WriteSpool16(HPJOB16 hJob, LPSTR lpData, INT16 cch) CloseJob16(hJob); /* printing aborted */ nRet = SP_APPABORT; } +#endif } return nRet; } diff --git a/include/wine/wingdi16.h b/include/wine/wingdi16.h index 915af954da2..1db6663cbf9 100644 --- a/include/wine/wingdi16.h +++ b/include/wine/wingdi16.h @@ -483,6 +483,7 @@ BOOL16 WINAPI Polygon16(HDC16,const POINT16*,INT16); BOOL16 WINAPI Polyline16(HDC16,const POINT16*,INT16); BOOL16 WINAPI PtInRegion16(HRGN16,INT16,INT16); BOOL16 WINAPI PtVisible16(HDC16,INT16,INT16); +BOOL16 WINAPI QueryAbort16(HDC16,INT16); UINT16 WINAPI RealizeDefaultPalette16(HDC16); BOOL16 WINAPI Rectangle16(HDC16,INT16,INT16,INT16,INT16); BOOL16 WINAPI RectInRegion16(HRGN16,const RECT16 *);