gdi32: Return copies of the region in InquireVisRgn16 and GetClipRgn16.

This commit is contained in:
Alexandre Julliard 2009-11-17 12:26:04 +01:00
parent 569f56e87a
commit 61925b7e89
1 changed files with 10 additions and 16 deletions

View File

@ -3659,14 +3659,11 @@ DWORD WINAPI SetDCOrg16( HDC16 hdc16, INT16 x, INT16 y )
*/ */
HRGN16 WINAPI InquireVisRgn16( HDC16 hdc ) HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
{ {
HRGN16 ret = 0; static HRGN hrgn;
DC * dc = get_dc_ptr( HDC_32(hdc) );
if (dc) if (!hrgn) hrgn = CreateRectRgn( 0, 0, 0, 0 );
{ GetRandomRgn( HDC_32(hdc), hrgn, SYSRGN );
ret = HRGN_16(dc->hVisRgn); return HRGN_16(hrgn);
release_dc_ptr( dc );
}
return ret;
} }
@ -3760,14 +3757,11 @@ INT16 WINAPI RestoreVisRgn16( HDC16 hdc16 )
*/ */
HRGN16 WINAPI GetClipRgn16( HDC16 hdc ) HRGN16 WINAPI GetClipRgn16( HDC16 hdc )
{ {
HRGN16 ret = 0; static HRGN hrgn;
DC * dc = get_dc_ptr( HDC_32(hdc) );
if (dc) if (!hrgn) hrgn = CreateRectRgn( 0, 0, 0, 0 );
{ GetClipRgn( HDC_32(hdc), hrgn );
ret = HRGN_16(dc->hClipRgn); return HRGN_16(hrgn);
release_dc_ptr( dc );
}
return ret;
} }