[Wine-patches] [eter-2.1] gdi32: Make sure that actual clipping region is updated for a EMF DC. (eterbug #8867)

Dmitry Timoshkov dtimoshkov на etersoft.ru
Чт Фев 14 07:51:55 MSK 2013


(cherry picked from commit 9a2688e690866f20602a3daf517bb2b9f74b87e4)
---
 dlls/gdi32/enhmfdrv/dc.c    |  3 ++-
 dlls/gdi32/tests/metafile.c | 11 +++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c
index 817872c..44dc741 100644
--- a/dlls/gdi32/enhmfdrv/dc.c
+++ b/dlls/gdi32/enhmfdrv/dc.c
@@ -191,6 +191,7 @@ INT EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
 
 INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
 {
+    PHYSDEV next = GET_NEXT_PHYSDEV( dev, pExtSelectClipRgn );
     EMREXTSELECTCLIPRGN *emr;
     DWORD size, rgnsize;
     BOOL ret;
@@ -213,7 +214,7 @@ INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
 
     ret = EMFDRV_WriteRecord( dev, &emr->emr );
     HeapFree( GetProcessHeap(), 0, emr );
-    return ret ? SIMPLEREGION : ERROR;
+    return ret ? next->funcs->pExtSelectClipRgn( next, hrgn, mode ) : ERROR;
 }
 
 INT EMFDRV_SetMapMode( PHYSDEV dev, INT mode )
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index e4413db..2623847 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -2477,14 +2477,13 @@ static void test_emf_clipping(void)
     SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
     hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom);
     SelectClipRgn(hdc, hrgn);
+    SetRect(&rc_res, -1, -1, -1, -1);
     ret = GetClipBox(hdc, &rc_res);
-todo_wine
     ok(ret == SIMPLEREGION, "got %d\n", ret);
-    if(ret == SIMPLEREGION)
-        ok(EqualRect(&rc_res, &rc_sclip),
-                 "expected rc_res (%d, %d) - (%d, %d), got (%d, %d) - (%d, %d)\n",
-                 rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
-                 rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
+    ok(EqualRect(&rc_res, &rc_sclip),
+       "expected rc_res (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
+       rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
+       rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
 
     hemf = CloseEnhMetaFile(hdc);
     DeleteEnhMetaFile(hemf);
-- 
1.8.1.3



Подробная информация о списке рассылки Wine-patches