Commit 826c1d87 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Use a more appropriate size for the default clip region.

parent 21635133
......@@ -86,9 +86,22 @@ void CLIPPING_UpdateGCRegion( DC * dc )
*/
static inline void create_default_clip_region( DC * dc )
{
dc->hClipRgn = CreateRectRgn(0, 0,
GetDeviceCaps( dc->hSelf, HORZRES ),
GetDeviceCaps( dc->hSelf, VERTRES ));
UINT width, height;
if (GDIMAGIC( dc->header.wMagic ) == MEMORY_DC_MAGIC)
{
BITMAP bitmap;
GetObjectW( dc->hBitmap, sizeof(bitmap), &bitmap );
width = bitmap.bmWidth;
height = bitmap.bmHeight;
}
else
{
width = GetDeviceCaps( dc->hSelf, DESKTOPHORZRES );
height = GetDeviceCaps( dc->hSelf, DESKTOPVERTRES );
}
dc->hClipRgn = CreateRectRgn( 0, 0, width, height );
}
......
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