From 94ee1ebd6c2fd46b2c290daea94a97ac28bd9486 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 9 Dec 2004 11:51:21 +0000 Subject: [PATCH] Remove a few no longer needed 16-bit exports from gdi32. --- dlls/gdi/gdi32.spec | 4 ---- windows/nonclient.c | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/gdi/gdi32.spec b/dlls/gdi/gdi32.spec index d58d467a709..bc4980333ad 100644 --- a/dlls/gdi/gdi32.spec +++ b/dlls/gdi/gdi32.spec @@ -425,14 +425,10 @@ @ stdcall DeleteMetaFile16(long) @ stdcall DrvGetPrinterData16(str str ptr ptr long ptr) @ stdcall DrvSetPrinterData16(str str long ptr long) -@ stdcall ExcludeVisRect16(long long long long long) @ stdcall GetDCState16(long) -@ stdcall IntersectVisRect16(long long long long long) -@ stdcall IsDCCurrentPalette16(long) @ stdcall OpenJob16(str str long) @ stdcall SelectVisRgn16(long long) @ stdcall SetDCHook(long ptr long) -@ stdcall SetDCOrg16(long long long) @ stdcall SetDCState16(long long) @ stdcall SetHookFlags16(long long) @ stdcall WriteSpool16(long ptr long) diff --git a/windows/nonclient.c b/windows/nonclient.c index 71d8807b367..c05b72e8cf9 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -943,6 +943,7 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint ) WND *wndPtr; DWORD dwStyle, dwExStyle; WORD flags; + HRGN hrgn; RECT rectClient, rectWindow; int has_menu; @@ -969,19 +970,21 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint ) Now, how is the "system" supposed to tell what happened? */ - if (!(hdc = GetDCEx( hwnd, (clip > (HRGN)1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | - ((clip > (HRGN)1) ?(DCX_INTERSECTRGN | DCX_KEEPCLIPRGN) : 0) ))) return; - - - if (ExcludeVisRect16( HDC_16(hdc), rectClient.left-rectWindow.left, - rectClient.top-rectWindow.top, - rectClient.right-rectWindow.left, - rectClient.bottom-rectWindow.top ) - == NULLREGION) + hrgn = CreateRectRgn( rectClient.left - rectWindow.left, + rectClient.top - rectWindow.top, + rectClient.right - rectWindow.left, + rectClient.bottom - rectWindow.top ); + if (clip > (HRGN)1) { - ReleaseDC( hwnd, hdc ); - return; + CombineRgn( hrgn, clip, hrgn, RGN_DIFF ); + hdc = GetDCEx( hwnd, hrgn, DCX_USESTYLE | DCX_WINDOW | DCX_INTERSECTRGN ); } + else + { + hdc = GetDCEx( hwnd, hrgn, DCX_USESTYLE | DCX_WINDOW | DCX_EXCLUDERGN ); + } + + if (!hdc) return; rect.top = rect.left = 0; rect.right = rectWindow.right - rectWindow.left;