From be07990679df93e5f28292e8c7a3ecb8c62bae12 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 26 Apr 2004 19:58:45 +0000 Subject: [PATCH] fixed NtGdiPtVisible() svn path=/trunk/; revision=9225 --- reactos/subsys/win32k/objects/cliprgn.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/reactos/subsys/win32k/objects/cliprgn.c b/reactos/subsys/win32k/objects/cliprgn.c index c87f800fcf9..79d2c4f305a 100644 --- a/reactos/subsys/win32k/objects/cliprgn.c +++ b/reactos/subsys/win32k/objects/cliprgn.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: cliprgn.c,v 1.35 2004/04/25 16:40:39 weiden Exp $ */ +/* $Id: cliprgn.c,v 1.36 2004/04/26 19:58:45 weiden Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -370,7 +370,7 @@ BOOL STDCALL NtGdiPtVisible(HDC hDC, int X, int Y) { - BOOL Ret; + HRGN rgn; DC *dc; if(!(dc = DC_LockDc(hDC))) @@ -379,17 +379,10 @@ BOOL STDCALL NtGdiPtVisible(HDC hDC, return FALSE; } - if(dc->w.hClipRgn) - { - Ret = NtGdiPtInRegion(dc->w.hClipRgn, X, Y); - } - else - { - Ret = FALSE; - } - + rgn = dc->w.hClipRgn; DC_UnlockDc(hDC); - return Ret; + + return (rgn ? NtGdiPtInRegion(rgn, X, Y) : FALSE); } BOOL STDCALL NtGdiRectVisible(HDC hDC,