mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 17:33:49 +00:00
- Reference CursorIcon before deleting it
- IntGetPaintMessage: Set MessageQueue->PaintCount to 0, if no dirty Window is found. Stops spamming the debuglog, once is enough. - UserGetDCEx: Check if a dce's hDC is valid, if not warn and create a new one. With our current code those hDCs should never get deleted, but this is also a hack, on Windows you can delete them. - Don't dump the stack backtrace twice in GDIOBJ_Xxx functions svn path=/trunk/; revision=32473
This commit is contained in:
parent
390717a188
commit
16956db4f1
4 changed files with 22 additions and 16 deletions
|
@ -523,7 +523,7 @@ IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
|
|||
|
||||
LIST_FOR_EACH_SAFE(CurIcon, tmp, &gCurIconList, CURICON_OBJECT, ListEntry)
|
||||
{
|
||||
// UserReferenceObject(CurIcon);
|
||||
UserReferenceObject(CurIcon);
|
||||
// if(NT_SUCCESS(UserReferenceObjectByPointer(Object, otCursorIcon)))
|
||||
{
|
||||
LIST_FOR_EACH(ProcessData, &CurIcon->ProcessList, CURICON_PROCESS, ListEntry)
|
||||
|
@ -532,6 +532,7 @@ IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
|
|||
{
|
||||
RemoveEntryList(&CurIcon->ListEntry);
|
||||
IntDestroyCurIconObject(WinSta, CurIcon, TRUE);
|
||||
CurIcon = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -539,7 +540,10 @@ IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process)
|
|||
// UserDereferenceObject(Object);
|
||||
}
|
||||
|
||||
|
||||
if (CurIcon)
|
||||
{
|
||||
UserDereferenceObject(CurIcon);
|
||||
}
|
||||
}
|
||||
|
||||
ObDereferenceObject(WinSta);
|
||||
|
|
|
@ -696,6 +696,8 @@ IntGetPaintMessage(HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax,
|
|||
if (Message->hwnd == NULL)
|
||||
{
|
||||
DPRINT1("PAINTING BUG: Thread marked as containing dirty windows, but no dirty windows found!\n");
|
||||
/* Hack to stop spamming the debuglog ! */
|
||||
MessageQueue->PaintCount = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -506,6 +506,13 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
if (!GDIOBJ_ValidateHandle(Dce->hDC, GDI_OBJECT_TYPE_DC))
|
||||
{
|
||||
DPRINT1("FIXME: Got DCE with invalid hDC!\n");
|
||||
Dce->hDC = DceCreateDisplayDC();
|
||||
/* FIXME: Handle error */
|
||||
}
|
||||
|
||||
Dce->hwndCurrent = (Window ? Window->hSelf : NULL);
|
||||
Dce->DCXFlags = Flags | DCX_DCEBUSY;
|
||||
|
||||
|
@ -597,7 +604,7 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
|
|||
}
|
||||
|
||||
if (!Hit) IntGdiDeleteDC(pdce->hDC, TRUE);
|
||||
|
||||
|
||||
if (pdce->hClipRgn && ! (pdce->DCXFlags & DCX_KEEPCLIPRGN))
|
||||
{
|
||||
NtGdiDeleteObject(pdce->hClipRgn);
|
||||
|
@ -762,7 +769,7 @@ DceResetActiveDCEs(PWINDOW_OBJECT Window)
|
|||
} while (pDCE != FirstDce);
|
||||
}
|
||||
|
||||
HDC
|
||||
HDC
|
||||
FASTCALL
|
||||
IntGetDC(PWINDOW_OBJECT Window)
|
||||
{
|
||||
|
@ -811,7 +818,7 @@ UserReleaseDC(PWINDOW_OBJECT Window, HDC hDc, BOOL EndPaint)
|
|||
KeEnterCriticalRegion();
|
||||
do
|
||||
{
|
||||
if (dce->hDC == hDc)
|
||||
if (dce->hDC == hDc)
|
||||
{
|
||||
Hit = TRUE;
|
||||
break;
|
||||
|
@ -821,7 +828,7 @@ UserReleaseDC(PWINDOW_OBJECT Window, HDC hDc, BOOL EndPaint)
|
|||
}
|
||||
while (dce != FirstDce );
|
||||
KeLeaveCriticalRegion();
|
||||
|
||||
|
||||
if ( Hit && (dce->DCXFlags & DCX_DCEBUSY))
|
||||
{
|
||||
nRet = DceReleaseDC(dce, EndPaint);
|
||||
|
|
|
@ -330,7 +330,10 @@ LockErrorDebugOutput(HGDIOBJ hObj, PGDI_TABLE_ENTRY Entry, LPSTR Function)
|
|||
DPRINT1("%s: Attempted to lock object 0x%x, something went wrong, typeinfo = 0x%x\n",
|
||||
Function, hObj, Entry->Type);
|
||||
}
|
||||
#ifdef GDI_DEBUG
|
||||
DPRINT1("-> called from:\n");
|
||||
KeRosDumpStackFrames(NULL, 20);
|
||||
#endif
|
||||
}
|
||||
|
||||
ULONG
|
||||
|
@ -952,11 +955,6 @@ GDIOBJ_LockObj (PGDI_HANDLE_TABLE HandleTable, HGDIOBJ hObj, DWORD ExpectedType)
|
|||
* locking type mismatches.
|
||||
*/
|
||||
LockErrorDebugOutput(hObj, Entry, "GDIOBJ_LockObj");
|
||||
|
||||
#ifdef GDI_DEBUG
|
||||
DPRINT1("-> called from:\n");
|
||||
KeRosDumpStackFrames(NULL, 20);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Unlock the handle table entry. */
|
||||
|
@ -1081,11 +1079,6 @@ GDIOBJ_ShareLockObj (PGDI_HANDLE_TABLE HandleTable, HGDIOBJ hObj, DWORD Expected
|
|||
* locking type mismatches.
|
||||
*/
|
||||
LockErrorDebugOutput(hObj, Entry, "GDIOBJ_ShareLockObj");
|
||||
|
||||
#ifdef GDI_DEBUG
|
||||
DPRINT1("-> called from:\n");
|
||||
KeRosDumpStackFrames(NULL, 20);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Unlock the handle table entry. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue