mirror of
https://github.com/reactos/reactos.git
synced 2025-05-20 17:45:06 +00:00
[WIN32K]
- Allow NtGdiDeleteObjectApp to delete a permanent DC, as windows does it. This is not exactly what windows does, but no one should use a DeletedDC'ed DC anyway. Fixes "No! You Naughty Application" debug spam and some wine tests svn path=/branches/reactos-yarotows/; revision=47131
This commit is contained in:
parent
9e7867ddde
commit
0a68d5e2e4
1 changed files with 19 additions and 2 deletions
|
@ -801,11 +801,28 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
|
|||
|
||||
if (!Force)
|
||||
{
|
||||
/* Windows permits NtGdiDeleteObjectApp to delete a permanent DC
|
||||
* For some reason, it's still a valid handle, pointing to some kernel data.
|
||||
* Not sure if this is a bug, a feature, some cache stuff... Who knows?
|
||||
* See NtGdiDeleteObjectApp test for details */
|
||||
if (DCToDelete->fs & DC_FLAG_PERMANENT)
|
||||
{
|
||||
DPRINT1("No! You Naughty Application!\n");
|
||||
DC_UnlockDc(DCToDelete);
|
||||
return UserReleaseDC(NULL, hDC, FALSE);
|
||||
if(UserReleaseDC(NULL, hDC, FALSE))
|
||||
{
|
||||
/* ReactOs feature : call UserReleaseDC
|
||||
* I don't think windows does it.
|
||||
* Still, complain, no one should ever call DeleteDC
|
||||
* on a window DC */
|
||||
DPRINT1("No, you naughty application!\n");
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is not a window owned DC.
|
||||
* Force its deletion */
|
||||
return IntGdiDeleteDC(hDC, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue