Commit 61925b7e authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 569f56e8
...@@ -3659,14 +3659,11 @@ DWORD WINAPI SetDCOrg16( HDC16 hdc16, INT16 x, INT16 y ) ...@@ -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 ) ...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment