mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Remove DCE from linked list on destroy
svn path=/trunk/; revision=4261
This commit is contained in:
parent
4817869d83
commit
10283bad30
3 changed files with 34 additions and 2 deletions
|
@ -44,5 +44,6 @@ PDCE DCE_FreeDCE(PDCE dce);
|
|||
VOID DCE_FreeWindowDCE(HWND);
|
||||
INT DCE_ExcludeRgn(HDC, HWND, HRGN);
|
||||
BOOL DCE_InvalidateDCE(HWND, const PRECTL);
|
||||
BOOL DCE_InternalDelete(PDCE dce);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: windc.c,v 1.6 2002/09/01 20:39:56 dwelch Exp $
|
||||
/* $Id: windc.c,v 1.7 2003/03/08 00:46:14 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -528,4 +528,31 @@ NtUserGetDCEx(HWND hWnd, HANDLE hRegion, ULONG Flags)
|
|||
return(Dce->hDC);
|
||||
}
|
||||
|
||||
BOOL
|
||||
DCE_InternalDelete(PDCE Dce)
|
||||
{
|
||||
PDCE PrevInList;
|
||||
|
||||
if (Dce == FirstDce)
|
||||
{
|
||||
FirstDce = Dce->next;
|
||||
PrevInList = Dce;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (PrevInList = FirstDce; NULL != PrevInList; PrevInList = PrevInList->next)
|
||||
{
|
||||
if (Dce == PrevInList->next)
|
||||
{
|
||||
PrevInList->next = Dce->next;
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(NULL != PrevInList);
|
||||
}
|
||||
|
||||
return NULL != PrevInList;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
/*
|
||||
* GDIOBJ.C - GDI object manipulation routines
|
||||
*
|
||||
* $Id: gdiobj.c,v 1.20 2003/01/18 20:50:43 ei Exp $
|
||||
* $Id: gdiobj.c,v 1.21 2003/03/08 00:46:14 gvg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <include/dce.h>
|
||||
#include <win32k/gdiobj.h>
|
||||
#include <win32k/brush.h>
|
||||
#include <win32k/pen.h>
|
||||
|
@ -277,6 +278,9 @@ BOOL GDIOBJ_FreeObj(HGDIOBJ hObj, WORD Magic, DWORD Flag)
|
|||
case GO_BRUSH_MAGIC:
|
||||
case GO_FONT_MAGIC:
|
||||
break;
|
||||
case GO_DCE_MAGIC:
|
||||
bRet = DCE_InternalDelete( (PDCE) Obj );
|
||||
break;
|
||||
}
|
||||
handleEntry->hProcessId = 0;
|
||||
ExFreePool (handleEntry->pObject);
|
||||
|
|
Loading…
Reference in a new issue