Fixed functions where GDI objects were locked but not released.

svn path=/trunk/; revision=4034
This commit is contained in:
Eugene Ingerman 2003-01-18 20:47:32 +00:00
parent b8049283dc
commit 736ff1ac84
3 changed files with 20 additions and 13 deletions

View file

@ -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 $
*/
@ -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);
}

View file

@ -60,13 +60,16 @@ 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);
}

View file

@ -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?