From: Haoyang Chen chenhaoyang@kylinos.cn
--- dlls/gdiplus/graphics.c | 3 +++ dlls/gdiplus/tests/graphics.c | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 1a11cca1892..f7559201c59 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -6039,6 +6039,9 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string if(!graphics || !string || !font || !brush || !rect) return InvalidParameter;
+ if(graphics->busy) + return ObjectBusy; + if(has_gdi_dc(graphics)) { status = gdi_dc_acquire(graphics, &hdc); diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 29529463fa5..a7efec723ab 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -2336,7 +2336,7 @@ static void test_GdipDrawString(void) GpStringFormat *format; GpBrush *brush; LOGFONTA logfont; - HDC hdc = GetDC( hwnd ); + HDC hdc = GetDC( hwnd ), temp_hdc; static const WCHAR string[] = L"Test"; static const PointF positions[4] = {{0,0}, {1,1}, {2,2}, {3,3}}; GpMatrix *matrix; @@ -2390,6 +2390,16 @@ static void test_GdipDrawString(void) status = GdipDrawString(graphics, string, 4, fnt, &rect, format, brush); expect(Ok, status);
+ status = GdipGetDC(graphics, &temp_hdc); + expect(Ok, status); + ok(temp_hdc != NULL, "got NULL temp_hdc\n"); + + status = GdipDrawString(graphics, string, 4, fnt, &rect, format, brush); + expect(ObjectBusy, status); + + status = GdipReleaseDC(graphics, temp_hdc); + expect(Ok, status); + status = GdipCreateMatrix(&matrix); expect(Ok, status);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147986
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000000FC00DE, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
This merge request was approved by Esme Povirk.