mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Fixed an old typo bug from rev 3450 by dwelch. Add support for DCX_NORESETATTRS and fixed up IntWindowFromDC.
svn path=/trunk/; revision=29394
This commit is contained in:
parent
fe4f628972
commit
853d34afaf
1 changed files with 22 additions and 12 deletions
|
@ -248,22 +248,25 @@ DceReleaseDC(DCE* dce, BOOL EndPaint)
|
||||||
|
|
||||||
if (dce->DCXFlags & DCX_CACHE)
|
if (dce->DCXFlags & DCX_CACHE)
|
||||||
{
|
{
|
||||||
/* make the DC clean so that SetDCState doesn't try to update the vis rgn */
|
if (!(dce->DCXFlags & DCX_NORESETATTRS))
|
||||||
IntGdiSetHookFlags(dce->hDC, DCHF_VALIDATEVISRGN);
|
{
|
||||||
|
/* make the DC clean so that SetDCState doesn't try to update the vis rgn */
|
||||||
|
IntGdiSetHookFlags(dce->hDC, DCHF_VALIDATEVISRGN);
|
||||||
|
|
||||||
PDC dc = DC_LockDc ( dce->hDC );
|
PDC dc = DC_LockDc ( dce->hDC );
|
||||||
IntGdiCopyFromSaveState(dc, defaultDCstate, dce->hDC ); // Was SetDCState.
|
IntGdiCopyFromSaveState(dc, defaultDCstate, dce->hDC ); // Was SetDCState.
|
||||||
|
|
||||||
dce->DCXFlags &= ~DCX_DCEBUSY;
|
dce->DCXFlags &= ~DCX_DCEBUSY;
|
||||||
if (dce->DCXFlags & DCX_DCEDIRTY)
|
if (dce->DCXFlags & DCX_DCEDIRTY)
|
||||||
{
|
{
|
||||||
/* don't keep around invalidated entries
|
/* don't keep around invalidated entries
|
||||||
* because SetDCState() disables hVisRgn updates
|
* because SetDCState() disables hVisRgn updates
|
||||||
* by removing dirty bit. */
|
* by removing dirty bit. */
|
||||||
dce->hwndCurrent = 0;
|
dce->hwndCurrent = 0;
|
||||||
dce->DCXFlags &= DCX_CACHE;
|
dce->DCXFlags &= DCX_CACHE;
|
||||||
dce->DCXFlags |= DCX_DCEEMPTY;
|
dce->DCXFlags |= DCX_DCEEMPTY;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -400,7 +403,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
if (Flags & DCX_NOCLIPCHILDREN)
|
if (Flags & DCX_NOCLIPCHILDREN)
|
||||||
{
|
{
|
||||||
Flags |= DCX_CACHE;
|
Flags |= DCX_CACHE;
|
||||||
Flags |= ~(DCX_PARENTCLIP | DCX_CLIPCHILDREN);
|
Flags &= ~(DCX_PARENTCLIP | DCX_CLIPCHILDREN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & DCX_WINDOW)
|
if (Flags & DCX_WINDOW)
|
||||||
|
@ -475,6 +478,12 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
{
|
{
|
||||||
UpdateVisRgn = FALSE; /* updated automatically, via DCHook() */
|
UpdateVisRgn = FALSE; /* updated automatically, via DCHook() */
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* we should free dce->clip_rgn here, but Windows apparently doesn't */
|
||||||
|
Dce->DCXFlags &= ~(DCX_EXCLUDERGN | DCX_INTERSECTRGN);
|
||||||
|
Dce->hClipRgn = NULL;
|
||||||
|
}
|
||||||
#if 1 /* FIXME */
|
#if 1 /* FIXME */
|
||||||
UpdateVisRgn = TRUE;
|
UpdateVisRgn = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
@ -592,17 +601,18 @@ HWND FASTCALL
|
||||||
IntWindowFromDC(HDC hDc)
|
IntWindowFromDC(HDC hDc)
|
||||||
{
|
{
|
||||||
DCE *Dce;
|
DCE *Dce;
|
||||||
|
HWND Ret = NULL;
|
||||||
KeEnterCriticalRegion();
|
KeEnterCriticalRegion();
|
||||||
for (Dce = FirstDce; Dce != NULL; Dce = Dce->next)
|
for (Dce = FirstDce; Dce != NULL; Dce = Dce->next)
|
||||||
{
|
{
|
||||||
if(Dce->hDC == hDc)
|
if(Dce->hDC == hDc)
|
||||||
{
|
{
|
||||||
KeLeaveCriticalRegion();
|
Ret = Dce->hwndCurrent;
|
||||||
return Dce->hwndCurrent;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeLeaveCriticalRegion();
|
KeLeaveCriticalRegion();
|
||||||
return 0;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue