mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +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 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -233,7 +233,8 @@ BOOL STDCALL W32kPatBlt(HDC hDC,
|
||||||
NULL,
|
NULL,
|
||||||
PATCOPY);
|
PATCOPY);
|
||||||
}
|
}
|
||||||
GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC );
|
GDIOBJ_UnlockObj( dc->w.hBrush, GO_BRUSH_MAGIC );
|
||||||
|
DC_ReleasePtr( hDC );
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,13 +60,16 @@ W32kSelectVisRgn(HDC hdc, HRGN hrgn)
|
||||||
int retval;
|
int retval;
|
||||||
DC *dc;
|
DC *dc;
|
||||||
|
|
||||||
if (!hrgn) return ERROR;
|
if (!hrgn)
|
||||||
if (!(dc = DC_HandleToPtr(hdc))) return ERROR;
|
return ERROR;
|
||||||
|
if (!(dc = DC_HandleToPtr(hdc)))
|
||||||
|
return ERROR;
|
||||||
|
|
||||||
dc->w.flags &= ~DC_DIRTY;
|
dc->w.flags &= ~DC_DIRTY;
|
||||||
|
|
||||||
retval = W32kCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY);
|
retval = W32kCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY);
|
||||||
CLIPPING_UpdateGCRegion(dc);
|
CLIPPING_UpdateGCRegion(dc);
|
||||||
|
DC_ReleasePtr( hdc );
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -93,12 +96,15 @@ int STDCALL W32kGetClipBox(HDC hDC,
|
||||||
int retval;
|
int retval;
|
||||||
DC *dc;
|
DC *dc;
|
||||||
|
|
||||||
if (!(dc = DC_HandleToPtr(hDC))) return ERROR;
|
if (!(dc = DC_HandleToPtr(hDC)))
|
||||||
|
return ERROR;
|
||||||
retval = UnsafeW32kGetRgnBox(dc->w.hGCClipRgn, rc);
|
retval = UnsafeW32kGetRgnBox(dc->w.hGCClipRgn, rc);
|
||||||
rc->left -= dc->w.DCOrgX;
|
rc->left -= dc->w.DCOrgX;
|
||||||
rc->right -= dc->w.DCOrgX;
|
rc->right -= dc->w.DCOrgX;
|
||||||
rc->top -= dc->w.DCOrgY;
|
rc->top -= dc->w.DCOrgY;
|
||||||
rc->bottom -= dc->w.DCOrgY;
|
rc->bottom -= dc->w.DCOrgY;
|
||||||
|
|
||||||
|
DC_ReleasePtr( hDC );
|
||||||
W32kDPtoLP(hDC, (LPPOINT)rc, 2);
|
W32kDPtoLP(hDC, (LPPOINT)rc, 2);
|
||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ W32kRectangle(HDC hDC,
|
||||||
PATCOPY);
|
PATCOPY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC );
|
GDIOBJ_UnlockObj( dc->w.hBrush, GO_BRUSH_MAGIC );
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Move current position in DC?
|
// FIXME: Move current position in DC?
|
||||||
|
|
Loading…
Reference in a new issue