mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fixed functions where GDI objects were locked but not released.
svn path=/trunk/; revision=4034
This commit is contained in:
parent
b8049283dc
commit
736ff1ac84
3 changed files with 20 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: brush.c,v 1.17 2002/09/08 10:23:52 chorns Exp $
|
||||
/* $Id: brush.c,v 1.18 2003/01/18 20:46:31 ei Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -200,7 +200,7 @@ BOOL STDCALL W32kPatBlt(HDC hDC,
|
|||
BrushObj = (BRUSHOBJ*) GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC);
|
||||
assert(BrushObj);
|
||||
if (BrushObj->logbrush.lbStyle != BS_NULL)
|
||||
{
|
||||
{
|
||||
if (Width > 0)
|
||||
{
|
||||
DestRect.left = XLeft + dc->w.DCOrgX;
|
||||
|
@ -213,15 +213,15 @@ BOOL STDCALL W32kPatBlt(HDC hDC,
|
|||
}
|
||||
if (Height > 0)
|
||||
{
|
||||
DestRect.top = YLeft + dc->w.DCOrgY;
|
||||
DestRect.top = YLeft + dc->w.DCOrgY;
|
||||
DestRect.bottom = YLeft + Height + dc->w.DCOrgY;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestRect.top = YLeft + Height + dc->w.DCOrgY;
|
||||
DestRect.top = YLeft + Height + dc->w.DCOrgY;
|
||||
DestRect.bottom = YLeft + dc->w.DCOrgY;
|
||||
}
|
||||
ret = EngBitBlt(SurfObj,
|
||||
ret = EngBitBlt(SurfObj,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -233,7 +233,8 @@ BOOL STDCALL W32kPatBlt(HDC hDC,
|
|||
NULL,
|
||||
PATCOPY);
|
||||
}
|
||||
GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC );
|
||||
GDIOBJ_UnlockObj( dc->w.hBrush, GO_BRUSH_MAGIC );
|
||||
DC_ReleasePtr( hDC );
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,19 +54,22 @@ HRGN WINAPI SaveVisRgn(HDC hdc)
|
|||
return copy;
|
||||
}
|
||||
|
||||
INT WINAPI
|
||||
INT WINAPI
|
||||
W32kSelectVisRgn(HDC hdc, HRGN hrgn)
|
||||
{
|
||||
int retval;
|
||||
DC *dc;
|
||||
|
||||
if (!hrgn) return ERROR;
|
||||
if (!(dc = DC_HandleToPtr(hdc))) return ERROR;
|
||||
if (!hrgn)
|
||||
return ERROR;
|
||||
if (!(dc = DC_HandleToPtr(hdc)))
|
||||
return ERROR;
|
||||
|
||||
dc->w.flags &= ~DC_DIRTY;
|
||||
|
||||
retval = W32kCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY);
|
||||
CLIPPING_UpdateGCRegion(dc);
|
||||
DC_ReleasePtr( hdc );
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -93,12 +96,15 @@ int STDCALL W32kGetClipBox(HDC hDC,
|
|||
int retval;
|
||||
DC *dc;
|
||||
|
||||
if (!(dc = DC_HandleToPtr(hDC))) return ERROR;
|
||||
if (!(dc = DC_HandleToPtr(hDC)))
|
||||
return ERROR;
|
||||
retval = UnsafeW32kGetRgnBox(dc->w.hGCClipRgn, rc);
|
||||
rc->left -= dc->w.DCOrgX;
|
||||
rc->right -= dc->w.DCOrgX;
|
||||
rc->top -= dc->w.DCOrgY;
|
||||
rc->bottom -= dc->w.DCOrgY;
|
||||
|
||||
DC_ReleasePtr( hDC );
|
||||
W32kDPtoLP(hDC, (LPPOINT)rc, 2);
|
||||
return(retval);
|
||||
}
|
||||
|
|
|
@ -140,12 +140,12 @@ W32kRectangle(HDC hDC,
|
|||
if (BrushObj)
|
||||
{
|
||||
if (BrushObj->logbrush.lbStyle != BS_NULL)
|
||||
{
|
||||
{
|
||||
DestRect.left = LeftRect + 1;
|
||||
DestRect.right = RightRect - 1;
|
||||
DestRect.top = TopRect + 1;
|
||||
DestRect.bottom = BottomRect - 1;
|
||||
ret = EngBitBlt(SurfObj,
|
||||
ret = EngBitBlt(SurfObj,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -158,7 +158,7 @@ W32kRectangle(HDC hDC,
|
|||
PATCOPY);
|
||||
}
|
||||
}
|
||||
GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC );
|
||||
GDIOBJ_UnlockObj( dc->w.hBrush, GO_BRUSH_MAGIC );
|
||||
}
|
||||
|
||||
// FIXME: Move current position in DC?
|
||||
|
|
Loading…
Reference in a new issue