From 7fd58cb13fc8e406bdf843c757b5dda3fcc439f4 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 13 Feb 2004 20:58:27 +0000 Subject: [PATCH] Get rid of a few 16-bit exports in gdi32. --- dlls/gdi/gdi32.spec | 3 --- dlls/ttydrv/wnd.c | 25 ++++++++----------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/dlls/gdi/gdi32.spec b/dlls/gdi/gdi32.spec index 8907752d16..54ae23bcc7 100644 --- a/dlls/gdi/gdi32.spec +++ b/dlls/gdi/gdi32.spec @@ -426,12 +426,9 @@ @ stdcall DrvSetPrinterData16(str str long ptr long) @ stdcall ExcludeVisRect16(long long long long long) @ stdcall GetDCState16(long) -@ stdcall InquireVisRgn16(long) @ stdcall IntersectVisRect16(long long long long long) @ stdcall IsDCCurrentPalette16(long) @ stdcall OpenJob16(str str long) -@ stdcall RestoreVisRgn16(long) -@ stdcall SaveVisRgn16(long) @ stdcall SelectVisRgn16(long long) @ stdcall SetDCHook(long ptr long) @ stdcall SetDCOrg16(long long long) diff --git a/dlls/ttydrv/wnd.c b/dlls/ttydrv/wnd.c index 0b6a9f14d9..71395e50b1 100644 --- a/dlls/ttydrv/wnd.c +++ b/dlls/ttydrv/wnd.c @@ -377,7 +377,8 @@ BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags ) SetDCOrg16( HDC_16(hdc), org.x, org.y ); - if (SetHookFlags16( HDC_16(hdc), DCHF_VALIDATEVISRGN )) /* DC was dirty */ + if (SetHookFlags16( HDC_16(hdc), DCHF_VALIDATEVISRGN ) || /* DC was dirty */ + ( flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) )) { if (flags & DCX_PARENTCLIP) { @@ -410,25 +411,15 @@ BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags ) hrgnVisible = DCE_GetVisRgn( hwnd, flags, 0, 0 ); OffsetRgn( hrgnVisible, org.x, org.y ); } + + /* apply additional region operation (if any) */ + if( flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) ) + CombineRgn( hrgnVisible, hrgnVisible, hrgn, + (flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF ); + SelectVisRgn16( HDC_16(hdc), HRGN_16(hrgnVisible) ); } - /* apply additional region operation (if any) */ - - if( flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) ) - { - if( !hrgnVisible ) hrgnVisible = CreateRectRgn( 0, 0, 0, 0 ); - - TRACE("\tsaved VisRgn, clipRgn = %p\n", hrgn); - - SaveVisRgn16( HDC_16(hdc) ); - CombineRgn( hrgnVisible, hrgn, 0, RGN_COPY ); - OffsetRgn( hrgnVisible, org.x, org.y ); - CombineRgn( hrgnVisible, HRGN_32(InquireVisRgn16(HDC_16(hdc))), hrgnVisible, - (flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF ); - SelectVisRgn16(HDC_16(hdc), HRGN_16(hrgnVisible)); - } - if (hrgnVisible) DeleteObject( hrgnVisible ); WIN_ReleaseWndPtr( wndPtr );